🤖 refactor: auto-cleanup#3555
Merged
Merged
Conversation
Dedupe the identical 'isOpen ? ChevronDown : ChevronRight' disclosure toggle that ScopeSection and DirRow each rendered inline. Both now use a local DisclosureChevron helper; rendered className output is unchanged (DirRow keeps its extra shrink-0).
Contributor
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
ThomasK33
approved these changes
Jun 15, 2026
The prior run failed only on 'built-in deep-review-workflow > auto-fix checkpoint retry preserves completed patch after HEAD advances' with 'Workflow run is already active' (a test-isolation lease collision). It passes locally on this branch and is unrelated to the MemoryBrowser-only cleanup in this PR.
Contributor
Author
Auto-fixup: CI failure is a pre-existing flaky test (no fix pushed)The failed run ( Why this is not caused by the cleanup
Reproduction
Action taken
If the flaky test recurs, hardening it belongs in a dedicated change to |
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.
Summary
Long-lived auto-cleanup PR. Each pass applies at most one extremely low-risk, behavior-preserving cleanup picked from recently merged
maincommits, then advances the checkpoint below.This pass
Extracted a local
DisclosureChevronhelper insrc/browser/features/Memory/MemoryBrowser.tsx. After #3553 ("prevent duplicate consolidation tooltip") touched this file, two sibling components still rendered the identical disclosure-caret toggle inline:ScopeSectionrendered{isOpen ? <ChevronDown className="text-muted h-3 w-3" /> : <ChevronRight className="text-muted h-3 w-3" />}.DirRowrendered the same toggle with an extrashrink-0class.Both now call one
DisclosureChevronhelper that picksChevronDown/ChevronRightfrom theopenprop and appends an optionalclassNameto the sharedtext-muted h-3 w-3sizing classes.aria-hidden="true", and a byte-identicalclassNamestring for each call site (text-muted h-3 w-3forScopeSection;text-muted h-3 w-3 shrink-0forDirRow). The class string is built by plain concatenation — nocn/twMergereordering is involved.Folder/FolderOpentoggle inDirRowis untouched. No type, schema, or public-API changes.Validation
bun test src/browser/features/RightSidebar/Memory/MemoryTab.test.tsx— 17 pass (covers scope section + directory collapse/expand, which exercise both chevron call sites).make static-check— eslint, typecheck x2 (tsgo), and prettier all pass. Theshfmt/hadolintsteps are skipped because those binaries are unavailable in this environment; no shell scripts or Dockerfiles were touched.Risks
Negligible. Pure local dedup of two equivalent disclosure-caret ternaries into one helper within a single file, with per-call-site rendered output preserved and unit coverage over both consuming components.
Auto-cleanup checkpoint: a815fd3
Generated with
mux• Model:anthropic:claude-opus-4-8• Thinking:xhigh• Cost:n/a