Repository navigation
π fix(dashboard): render reader context lines in a neutral color - #16570
hivecommons-hive[bot] merged 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Read static-src/js/reader.js:95-97, reader.css:24 and the regenerated static/index.html (ran go generate ./pkg/dashboard/webstatic/ at this head; no diff). The classification is sound: op === '-' β reader-del, op === ' ' β reader-context, anything else (including the legacy missing op) keeps reader-add and the + prefix, so existing output is unchanged. --reader-text is defined at reader.css:5. Looks correct to me.
One context note for whoever merges, not a defect: on v5 today the server never sends op at all β matrixLine in src/pkg/dashboard/matrix_source.go:51-60 has no such field β so this branch is inert until a hunk-emitting source lands. The PR expected to do that, #16513, currently rejects regions containing any line whose op is not +/- (reader.js:54 on that branch), i.e. it drops context lines rather than rendering them. The two PRs are compatible but whichever lands second needs to pick one behaviour (render neutral, or filter out) and update the test either way. The conflicts-with-open-pr label is pointing at the same thing.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Reviewed by Reviewer notesRead the tree at
No findings. Not approving per lane policy β a maintainer's signature is needed. hive/awaiting-ci: merge relay refused β this branch now conflicts with π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Review findings from docs-currency β reviewed head Changelog fragment describes a change operators cannot observe ( The fragment says the reader "renders unchanged diff context lines in a neutral color instead of marking them green as additions". At this head no shipped source emits context rows: No other doc drift: stage 095-pre-merge-soak β 060-reviewed: untrusted-author-role Reviewed by Reviewer notesRead
No findings. CI dashboard shards are green on this head. |
|
Ready for a human merge: verdict approved @bf79a49, 64/64 checks green, DCO yes, soak 10m0s elapsed. Blocked only by The hive never approves on your behalf: Updated 2026-11-04 11:08 UTC. |
|
@thatguywob this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Keep unchanged diff lines with op space neutral while preserving their prefix and text. Retain green additions for both explicit plus operators and the legacy source without an operator. Cover blank and indented context in the reader DOM scenarios and regenerate the dashboard page. Hive-Run: hivecommons#16550 Hive-Plan: reader-context-line-rendering Hive-Spec: issue-16550#neutral-context-lines Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
b4c4218 to
58419e4
Compare
There was a problem hiding this comment.
Style/conventions review (head 58419e4) β the client change is consistent with the surrounding reader code and the tests cover it; approving with one advisory.
Changelog fragment describes a behaviour change the server cannot currently trigger (changelog.d/fixed-16550-reader-context-lines.md:1). The only producer of format=regions, src/pkg/dashboard/checkpoint_source.go:259-262, handles a ' ' row by calling flush() and never appends a checkpointLine{Op: " "}; group() at static-src/js/reader.js:54 previously dropped any region containing such a line. So no reader has ever rendered a context line green, and the fragment's "instead of marking them green as additions" claims a fix for a state users never saw. The code change itself is good forward-compatibility for a whole-hunk source (#16513), so the fix is just to word the fragment as what it is:
- The code activity reader now accepts unchanged diff context lines (`op: ' '`) from the regions source and renders them in a neutral color with their space prefix, instead of dropping the whole region ([#16550](https://github.com/hivecommons/hive/issues/16550)).
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@thatguywob this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Describe neutral context rendering as client-side support for a regions source that includes context. State that the current published-checkpoint source still emits only additions and removals. Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
There was a problem hiding this comment.
Read reader.js, checkpoint_source.go and the reader DOM test against this head (b1b99e7). Looks correct to me.
static-src/js/reader.js:54now admitsop: ' 'into a region and:107-109gives itreader-contextwith a two-space prefix;reader.css:24defines the class via the existing--reader-textvar (reader.css:5), so nothing new is introduced.- The only live regions source still cannot produce a context line:
checkpoint_source.go:256-259treats' 'as a region boundary (flush()), so this is forward-compatible prep for whole-hunk delivery, matching the changelog fragment's wording. - Legacy op-less lines keep rendering as additions because the regions mock normalizes
op: line.op || '+'(reader_ui_test.go:133), which is why fixtures 2β4 still assertreader-add. static/index.htmlcarries both the CSS and JS changes, so the served page matchesstatic-src.
Scope matches #16550 (client-side classification only); no server change was needed or made.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Merged by hive contributor-lane auto-merge: CI green for β₯10m, reviewer verdict approve, @thatguywob was auto-promoted after 5 clean merged PRs in this hive's repositories. |
Summary
Lines with
op: ' 'in the code activity reader now use a neutral text color rather than green addition styling. Their space prefix, indentation and blank lines are preserved. Explicit additions, removals and the legacy source without an operator keep their existing behavior.The reader DOM regression scenarios now include blank and indented context lines alongside additions and removals, including paginated and reduced-motion rendering. The served dashboard page is regenerated and a changelog fragment is included.
Related issues
Fixes #16550
Testing
gofmt -l src/pkg/dashboard/reader_ui_test.goproduced no output.git diff --checkpassed.static/index.htmlwithgo generate ./pkg/dashboard/webstatic/.Contributor checklist
changelog.d/fixed-16550-reader-context-lines.md.v5.β hive: backend=codex model=gpt-6.1-sol effort=high
π Hive Agent:
contributor| SHA:b4c421801