Repository navigation
feat(ui): keep active diff file headers visible - #110
Conversation
|
fixed an issue with light mode, forgot to test it in light mode |
…-headers # Conflicts: # crates/ui/src/changes.rs
|
Updated the sticky diff headers to properly follow the active theme in both light and dark modes. Frosted themes now use a theme-aware content background tint, hover state, and border, while opaque themes preserve their expected appearance. Added tests covering both appearance modes and theme variants. |
wingleeio
left a comment
There was a problem hiding this comment.
No blocking findings.
Safety review: this stays within GPUI presentation/list-state code in crates/ui/src/changes.rs; it adds no dependency, network, filesystem, process, protocol, or unsafe-code surface. The sticky-header resolver bounds-checks stale indices, and the overlay preserves scroll pass-through and the existing collapse callback.
Validation:
git diff --check origin/main...c4a14a8rustfmt --check --edition 2024 crates/ui/src/changes.rscargo test -p zeron-ui changes— 33 passedcargo test -p zeron-ui— 556 passedcargo build -p zeron- Live QA in an isolated synthetic repository: unified/split layouts, push-off transition, sticky-header collapse, wheel pass-through, long-path truncation, and themed presentation
The repository-wide clippy command still reports 22 unrelated pre-existing warnings outside changes.rs; this patch introduces none of them.
Unified push-off transition:
Split-view sticky header:
Scroll pass-through and long-path truncation:
wingleeio
left a comment
There was a problem hiding this comment.
One visual change requested: please remove .shadow_sm() from the sticky diff header. It reads like a raised Material-style card and separates the header too heavily from the diff content. The existing 1px bottom border plus the themed surface tint/blur is enough to establish stickiness without introducing elevation.
|
Fixed, good catch, looks much better now |
feat(ui): keep active diff file headers visible
…#110) The folder browser's browsing half: FolderBrowserController (generation guard, failure statuses, listingUsable, live host list, listingIsRepo and onListingApplied hooks), NewProjectScreen (52 dp nav bar with glass x/close + sheet-centred title + engine capsule and its glass menu, the inset-grouped folder list with ticket 70 rows and the 160 dp bottom inset, serial-keyed sections for scroll retention), 92's NewSessionOptions.kt created per its spec (not yet landed), the debug gallery section + fixtures + FakeHostPaths, the gallery registration, controller tests and the Roborazzi screen tests. Builds/tests deferred to the CI/VPS batch per the speed-rule override.
The reviewer noted the Derived-strings table's 'C:\ -> C:\' example was only covered transitively; rowsAndTitleFollowTheListing now loads a 'C:\' listing and asserts the empty rows and the path-as-title.
Found by the import check over zeronsh#101, zeronsh#110, zeronsh#97, #41, #33 (not yet compiled by CI): - FolderBrowserController: Snapshot is androidx.compose.runtime.snapshots - NewProjectScreen: Layout is androidx.compose.ui.layout.Layout - SessionListStatusOverlay: Modifier.testTag is ui.platform.testTag (the semantics property was imported) - LicensesBehaviourTest: SemanticsMatcher is ui.test; onAllNodes is a member, not importable - SessionListBehaviourTest: Modifier and onRoot imports
… layer NewSessionDraft + JSON codec (iOS Codable shape, nulls omitted, lenient decode), NewSessionDraftStore (DataStore under newSessionDraft, text in 84's Drafts under new-session, memory-only images, launch harness override, engine forget + full reset epoch), ModelCatalog source + process-static cache, NewSessionModel (defaults, stale-id rule, rememberDraft/markCreated moments, loadModels with app-scope fetch), NewSessionDraftEffect (dispose + ON_STOP saves), RobocoApplication wiring. NewSessionOptions.kt stays zeronsh#110's verbatim stand-in, now owned by zeronsh#92.



Summary
Keep the active file header visible while scrolling through long diffs in the Changes panel.
The sticky header preserves the existing file path, binary status, addition/deletion counts, chevron, hover state, and collapse/expand interaction. When the next file header reaches the top boundary, it pushes the current sticky header away.
What changed
StickyFileHeaderresolver based on the flattened diff row ranges.Performance
partition_pointoverrow_ranges(O(log n)).top: 0.Scope
Covered through the shared Changes renderer:
Out of scope:
Validation
cargo fmt --all -- --checkcargo test -p zeron-ui changescargo test -p zeron-ui— 425 tests passedgit diff --checkcargo clippy -p zeron-ui --all-targets -- -D warningsis currently blocked by pre-existing unrelated lints in the workspace and other UI modules.Manual QA checklist