Skip to content

Conversation

@Abdullah85MBA
Copy link

@Abdullah85MBA Abdullah85MBA commented Oct 23, 2025

I reached out earlier this year about building a diagram for how lossless cut works under the hood since I use it personally, and Mikael expressed his interest.

Here is the generated diagram for lossless-cut grouped by the application's use-cases and their runtime data flows:
Open lossless-cut's interactive diagram

image

I built code canvas to simulate a senior engineer who have been working on lossless-cut's codebase for pretty long and can explain to you any functionality of the repository visually through diagrams.

Here is what users are saying about codecanvas

"I used to spend 4 hours asking GPT how a use case in a codebase works and I keep going back and forth until I am able to draw a diagram to summarize my understanding,
CodeCanvas gives me that diagram in 40 seconds"


Some Notes:

  • The diagram is already generated for lossless-cut, completely free, no monthly subscription. Consider it as my contribution to help fellow contributors lower their context onboarding friction before they can start contributing.
  • The diagram file is stored in the repository itself, so the readme link will only work after merging. Until then, you can view the diagram from the link I shared above.
  • Read the 1 pager guide to learn how to refine simulations to capture specific codebase logics you might want to cover.
  • I am aware the mapping to the source code is shifted a couple lines off in some cases, I am working on fixing the bug asap.
  • You can reach me out anytime on discord discord.gg/t3ezMyMPqr

Summary by CodeRabbit

  • Documentation
    • Added a new "How does lossless-cut work under the hood?" section with two interactive tutorial links and a reference image.
    • Inserted the new explanatory content in two places within the documentation to improve discoverability.

@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

Walkthrough

Added a new documentation subsection "How does lossless-cut work under the hood?" to README.md in two places, containing two CodeCanvas tutorial links and a diagram image. No code, API, or control-flow changes were made.

Changes

Cohort / File(s) Change Summary
Documentation
README.md
Inserted a new subsection titled "How does `lossless-cut` work under the hood?" (two placements), including two CodeCanvas tutorial links and an illustrative diagram image. No functional or public API changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped into README light,
Found new links sparkling bright,
Tutorials, diagrams in tow,
Now the inner workings show! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Add interactive CodeCanvas diagram for lossless-cut" directly and accurately reflects the main change in the changeset, which is the addition of a new documentation subsection containing interactive CodeCanvas tutorial links and an image to the README.md file. The title is concise (6 words, 51 characters), specific, and clearly communicates the primary contribution without vague language, noise, or file lists. A developer scanning the repository's git history would immediately understand that this PR introduces CodeCanvas diagram documentation to the project.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 251023b and a7a9407.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

169-169: Link text should be descriptive

(MD059, descriptive-link-text)


171-171: Link text should be descriptive

(MD059, descriptive-link-text)

🔇 Additional comments (1)
README.md (1)

167-173: ****

The AI summary claims the section "appears in two locations within the file, duplicating the same content," but the provided code shows only one instance (lines 167–173). Please verify whether the section genuinely appears twice in the full diff.

README.md Outdated

### How does `lossless-cut` work under the hood?

Check out this interactive walkthrough of the `lossless-cut` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=lossless-cut&owner=mifi&branch=master&OnboardingTutorial=true).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use descriptive link text instead of "here".

Link text "here" is non-descriptive and violates accessibility best practices (MD059). Descriptive link text helps screen readers and improves SEO.

Apply this diff to make link text more descriptive:

-Check out this interactive walkthrough of the `lossless-cut` codebase on CodeCanvas [here](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=lossless-cut&owner=mifi&branch=master&OnboardingTutorial=true).
+Check out this [interactive CodeCanvas walkthrough of the `lossless-cut` codebase](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=lossless-cut&owner=mifi&branch=master&OnboardingTutorial=true).

-To refine existing dataflow simulation or create new ones, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
+To refine existing dataflow simulation or create new ones, follow the [CodeCanvas diagram update guide](https://docs.code-canvas.com/updating-diagram).

Also applies to: 171-171

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

169-169: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
In README.md around lines 169 and 171, the link text uses the non-descriptive
word "here"; replace it with meaningful, accessible link text such as
"interactive CodeCanvas walkthrough of the lossless-cut codebase" (or similar
descriptive phrase) while keeping the same URL, updating both occurrences so the
markdown link reads like "[interactive CodeCanvas walkthrough of the
lossless-cut
codebase](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=lossless-cut&owner=mifi&branch=master&OnboardingTutorial=true)"
to satisfy accessibility/MD059 requirements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
README.md (1)

171-171: Use descriptive link text instead of "here".

Link text "here" is non-descriptive and violates MD059 accessibility guidelines. This was flagged in a previous review; please address it in this version.

Apply this diff to make the link text more descriptive:

-To refine existing dataflow simulation or create new ones, follow the quick tutorial [here](https://docs.code-canvas.com/updating-diagram).
+To refine existing dataflow simulation or create new ones, follow the [CodeCanvas diagram update guide](https://docs.code-canvas.com/updating-diagram).
🧹 Nitpick comments (1)
README.md (1)

169-169: Improve link text to be more descriptive.

The link text "diagram" is generic. Following accessibility best practices (MD059), the link text should be self-contained and descriptive without relying on surrounding context.

Apply this diff to make the link more descriptive:

-Check out this interactive walkthrough of the `lossless-cut` codebase on the CodeCanvas [diagram](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=lossless-cut&owner=mifi&branch=master&OnboardingTutorial=true).
+Check out the [interactive CodeCanvas walkthrough of the `lossless-cut` codebase](https://www.code-canvas.com/?session=unauthenticatedGithub&repo=lossless-cut&owner=mifi&branch=master&OnboardingTutorial=true).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7a9407 and 9b90f34.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

171-171: Link text should be descriptive

(MD059, descriptive-link-text)

@Abdullah85MBA
Copy link
Author

Hi, just following up! lmk if you have questions.

@mifi
Copy link
Owner

mifi commented Nov 1, 2025

Hi! Not sure about this. the .CodeCanvas file is very large and hard to maintain/understand for a human. I tested the visual graph but i found it a bit slow and hard to find it helpful. Can leave this open and see if some other people find it useful.

@Abdullah85MBA
Copy link
Author

Thanks for taking a look Mikael. I am happy to adjust CodeCanvas to address your feedback. I just want to know how you tried to use CodeCanvas as I noticed that once people used the app in the intended way they found it very useful as they were able to understand complex apps dataflows almost instantly.

Some questions I have in mind, whether you tried the following:

  • Did you use this link to load the diagram?
  • Did you use Chrome?
  • Did you follow the onboarding tutorial or skipped it?
  • Did you follow the simulation for the different usecases of lossless-cut and moved through the simulation steps?

If you have done the above and still don't see the value of CodeCanvas then that's also important for me to know.

Finally, If you find it easier, I'd love to give you a 20 minutes onboarding for how to navigate the lossless-cut's codecanvas diagram, you can find a time slot that works for you here:

@Abdullah85MBA
Copy link
Author

Hi Mikael, Just floating the above.

@mifi
Copy link
Owner

mifi commented Nov 7, 2025

Hi. How does the codecanvas file stay in sync with code changes in the repo? I don’t see any additional commits to update the file in this Pr
Not sure of the benefits of keeping the codecanvas file here in this repo, if it requires the use of your saas app to view it (it could just be stored in your cloud) - or is there a standalone viewer that can be downloaded?

@Abdullah85MBA
Copy link
Author

Great points and feedback!

Right now, if the code changes significantly I just hit the "Refine Simulation" button to generate the simulation, in 2 weeks I will add a github actions option that runs on each new commit to regenerated impacted parts of the diagram with the new commit's code change.

As for hosting on my own DB, I wanted the diagram to stay closely coupled with the code and that the repo owner has control over the diagram content. The tool will remain free for open source so users can always use it load the diagram, visualize and understand the inner works on the fly.

The other reason, and probably the main reason, is that I want the diagram to be source controlled and reviewed just like other files so that when users view the simulations, they know they can trust that what they are seeing is correct explanation and not AI slop.

@Abdullah85MBA
Copy link
Author

Hi Mikael, Just floating the above, if you're still not convinced with having the diagram in the repo, I can just point the README to my forked repo's diagram, although this is suboptimal for you because ideally the diagram lives in the repo and owned by its owner.

If you would like me to do to do so lmk.

@mifi
Copy link
Owner

mifi commented Nov 18, 2025

That’d be great thanks! And I’d like to put this under Contributing.md instead because it’s a really technical thing that most users won’t care about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants