Repository navigation
Fold the untouched links of a call chain into one row - #1559
Merged
Merged
Conversation
A change in one link of a chain such as new Hono().get(…).post(…) left every other link's arguments open, each folded on its own, with the lines between them folded separately: a dozen rows where one would do. Chained calls nest leftwards, so no node covers one link, and every link's arguments were bodies of the one statement around the chain. A link that starts its own line is now a scope. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xt4XEn4WzwdKXhfWPUiy97
thesiti92
approved these changes
Nov 22, 2026
milanb17
added a commit
that referenced
this pull request
Nov 22, 2026
Diffr Release. Ships #1559: the untouched links of a call chain fold into one row. Also included since 0.1.23: #1541 (zod namespace imports) and #1473 (Dependabot advisory patches). After this merges, the release is cut by pushing the tag `diffr/0.1.24`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Xt4XEn4WzwdKXhfWPUiy97 Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A change in one link of a call chain such as
new Hono().get(…).post(…).put(…)left every other link's arguments open, each folded on its own, and the lines between them folded separately. In cloudboard'sapps/api/src/app.tsthat was twelve folded rows back to back above a one-link change.Why
arguments, all of themcontext:bodychildren of the one statement around the chain.iteminplugins/shape/context/rust/src/lib.rs), so a change in any link opened every link's arguments.merge_runsjoins hidden siblings only, so the open bodies split the unchanged lines into one row each.Change
plugins/shape/context/queries/javascript.scm(TypeScript, TSX and JSX inherit it): a chain link that starts its own line is acontext:scope, from its.to the end of its arguments. An unchanged link is then an item like any other scope and joins its neighbours' row.actions.read().then() is left alone. Its scope would start on the arguments' first line, take the body's range, and open the callbacks inside it: thediffr_config_section_folds_unchanged_ai_summariescontract caught this in a first version, which showed two more lines there.Result
apps/api/src/app.ts, one link addedapps/api/src/repos/routes.server.ts.ts/.tsxfiles in cloudboardapps/web/src/routes/_app.welcome.repo.$owner.$name.tsxIn the last file a chain was rewritten onto one line. The row before its last line is one line shorter, and the re-indented
</ArrowRow>closer under it now shows as removed and added.Tests
tests/fixtures/context-contracts/typescript.rs: a change in the last link, and one in a middle link. Each shows the chain's first line, one row for the untouched links, and the changed link.cargo test --no-fail-fastindiffr/: all pass, the existing contracts unchanged.Not done
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xt4XEn4WzwdKXhfWPUiy97