Skip to content

feat(native): complete SB-ROW, SB-MENU, and SB-UPDATES parity (#380) - #395

Merged
rynfar merged 4 commits into
nativefrom
nw/380-sidebar-row-menu-updates
Nov 14, 2026
Merged

rynfar merged 4 commits into
nativefrom
nw/380-sidebar-row-menu-updates

Conversation

@rynfar

@rynfar rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Closes #380

Summary

Completes native parity for SB-ROW, SB-MENU, and SB-UPDATES and flips all three rows to done in apps/native/parity/LEDGER.md.

SB-ROW

  • pingdotgg/t3code#36420: Added shared t3_core::clock (record_server_clock, to_server_clock), ServerConfig.server_time, initial snapshot clock sync in t3_client::environments, and wired sidebar working/waiting timers to to_server_clock.
  • pingdotgg/t3code#31825: Added resolve_thread_activity_timestamp / activity_timestamp taking max(latest_user_message_at, latest_run.completed_at ?? started_at, updated_at).
  • pingdotgg/t3code#34218: Verified pull_requests/thread_badge.rs only resolves linked PRs with no branch-matched gitStatus.pr fallback.
  • pingdotgg/t3code#34878: Added without_removed_checkout and cleared branch/worktree badges when Checkout::Read observes !status.is_repo.

SB-MENU

  • pingdotgg/t3code#29025: Updated auto-settle menu labels to "Follow settings" / "Never".
  • pingdotgg/t3code#32507: Show "Thread actions unavailable" / "This thread has not loaded yet." warning toast when opening a menu for an unloaded settled shell.
  • pingdotgg/t3code#31418: Added LastTitleRegeneration on ThreadShell, ThreadTitleRegenerationState tracking in t3_client::environments, async regenerateTitle dispatch (commandId) across single and scoped threads, and title_regeneration_toast outcome notices ("Title kept", "Titles kept", "Failed to regenerate thread title", etc.).
  • pingdotgg/t3code#36527: Dropped routine copy-success toasts in the sidebar/thread action menu while preserving error toasts.

SB-UPDATES

  • pingdotgg/t3code#33538: Added checking state ("Checking for more…") and server.refreshProviders dispatch across connected manageable fleet servers when opening the updates dialog.
  • pingdotgg/t3code#35327: Added nudge_reconnect_during_restart (Reconnecting after 1s) wired into UpdatesController timers.
  • pingdotgg/t3code#32924: Added retry_failed_servers_with_versions to skip servers already at or ahead of the target version on Retry.
  • Verified open ledger issues #100 and #361 are already CLOSED on rynfar/t3code (and #221 copy-link behavior for SB-MENU already uses thread_reference).

Verification

  • node apps/native/scripts/gen-theme.ts --check — pass
  • node apps/native/conformance/generate.ts --check — pass
  • ./node_modules/.bin/vp fmt --check apps/native/parity/LEDGER.md — pass
  • node --test apps/native/parity/sync.test.ts — 42/42 pass (7 suites)
  • cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings — pass (0 warnings)
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-core -p t3-client — t3-core 1398 unit + 8 conformance pass; t3-client 112 pass
  • Targeted cargo test --manifest-path apps/native/Cargo.toml -p t3-native --features snapshot -- updates::tests sb_380_tests sidebar::row --test-threads=1 — 11 pass (plus 34 pass across context_menu, sidebar::{row,hover,search}, sb_380_tests, updates::tests in prior run)
  • cargo build --manifest-path apps/native/Cargo.toml -p t3-native — pass

Implemented with Gemini 3.1 Pro / Antigravity.

@rynfar
rynfar force-pushed the nw/380-sidebar-row-menu-updates branch from abbd110 to 62ea758 Compare November 14, 2026 17:21
@rynfar

rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Resolved the Round 1 review findings in commit 62ea75850d and verified with offscreen GPUI snapshot captures:

Summary of Fixes

  1. [P1] Removed checkout badge stripping on sidebar rows & worktree hover cards (pingdotgg/t3code#34878):
    • SidebarPane now watches checkout repository existence via subscribeVcsBranch (falling back immediately to subscribeVcsStatus when isRepo is omitted) and transforms local row views via without_removed_checkout(is_repo) in sidebar/row.rs + sidebar/hover.rs, stripping removed branch/worktree badges and allowing row_extras to fall back to scratch_machine.
    • ThreadHoverCard::checkout now queries VCS_REFRESH_STATUS for worktree checkouts as well (worktree_path.or(root)) unless the parent row already established is_repo == Some(false).
  2. [P1] Bulk title regeneration clears selection immediately & dispatches concurrently (pingdotgg/t3code#31418):
    • AppState::regenerate_titles (sidebar/bulk.rs) clears thread selection immediately on start and dispatches all eligible local thread.metadata.update { regenerateTitle: true } commands concurrently via futures::future::join_all, reporting combined outcomes through show_title_regeneration_toast.
  3. [P2] Header/sidebar menus on project-filtered loaded threads:
    • ThreadMenuOwner::allows, ContextMenu::open_thread, and AppState::snapshot_thread fall back from sidebar.model.thread(id) to state.thread_shell(id) (present_thread(shell, None)), so loaded threads filtered out of the visible project scope open normally instead of toasting "Thread actions unavailable".
  4. [P2] Provider check deduplication (pingdotgg/t3code#33538):
    • UpdateControl::refresh_providers_for_dialog tracks provider_check_in_flight: Option<u64> so reopening the dialog while a check wave is active keeps "Checking for more…" visible without launching duplicate server.refreshProviders waves.

Offscreen Snapshot Captures (--features snapshot)

  • Sidebar status rows (Working / live Goal 45s timer):
    sidebar-status-running
  • Sidebar working section & connected clock rows:
    sidebar-working-connected
  • Thread context menu (dark & light):
    dark-sidebar-menu
    light-sidebar-menu
  • Update dialog checking banner ("Checking for more..."):
    update-dialog-checking

Verification Gates

  • node apps/native/scripts/gen-theme.ts --check -> up to date
  • node apps/native/conformance/generate.ts --check -> pass
  • ./node_modules/.bin/vp fmt --check apps/native/parity/LEDGER.md -> pass
  • node --test apps/native/parity/sync.test.ts -> 42/42 passed
  • cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings -> pass (0 warnings)
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-core -p t3-client -> 1398 core + 8 conformance + 112 client passed
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-native --features snapshot (-- --test-threads=1):
    • sidebar::sb_380_tests -> 4/4 passed
    • sidebar::hover::tests -> 4/4 passed
    • updates::tests -> 9/9 passed
    • context_menu:: -> 14/14 passed
    • sidebar::sb_sections_pane_tests -> 7/7 passed
  • cargo build --manifest-path apps/native/Cargo.toml -p t3-native -> pass

@rynfar

rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Resolved the Round 2 [P2] finding in 72455cbbe3:

  • Exposed AppState::snapshot_thread within crate (apps/native/crates/app/src/sidebar/controller.rs) so both SidebarPane's ContextMenuEvent::Delete confirmation handler (apps/native/crates/app/src/sidebar/mod.rs) and ContextMenu::activate's ProjectSettings handler (apps/native/crates/app/src/context_menu.rs) fall back to thread_shell when the active thread is filtered out of sidebar.model.
  • Extended removed_checkout_strips_row_badges_and_header_menu_works_when_project_filtered to verify both Delete confirmation and ProjectSettings modal opening succeed on a project-filtered loaded thread.

Re-verified all 7 gates on 72455cbbe3:

  • node apps/native/scripts/gen-theme.ts --check -> up to date
  • node apps/native/conformance/generate.ts --check -> pass
  • ./node_modules/.bin/vp fmt --check apps/native/parity/LEDGER.md -> pass
  • node --test apps/native/parity/sync.test.ts -> 42/42 pass
  • cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings -> pass (0 warnings)
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-core -p t3-client -> 1398 core + 8 conformance + 112 client passed
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-native --features snapshot (-- --test-threads=1): sidebar::sb_380_tests (4/4), sidebar::hover::tests (4/4), updates::tests (9/9), context_menu:: (14/14), sidebar::sb_sections_pane_tests (7/7)
  • cargo build --manifest-path apps/native/Cargo.toml -p t3-native -> pass

@rynfar

rynfar commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Resolved the Round 3 findings in c036482bfb:

  • [P1] Archive / Unpin confirmation fallback (apps/native/crates/app/src/dialog.rs): AppState::thread_title and AppState::request_archive_thread now resolve through self.snapshot_thread(thread_id) so project-filtered loaded threads show their real title and honor confirmThreadArchive confirmation instead of bypassing ConfirmDialog.
  • [P2] Snooze / Unsnooze availability (apps/native/crates/app/src/snooze_dialog.rs): SnoozeRequest::resolve_ids now resolves via state.snapshot_thread(id) so Snooze / Unsnooze stay enabled on project-filtered header menus.
  • [P2] Test isolation (apps/native/crates/app/src/sidebar/mod.rs): Restored ProjectScope::default() (and confirmThreadArchive: false) in removed_checkout_strips_row_badges_and_header_menu_works_when_project_filtered teardown, and added assertions covering Archive confirmation and Snooze enablement.

Re-verified all 7 gates on c036482bfb:

  • node apps/native/scripts/gen-theme.ts --check -> up to date
  • node apps/native/conformance/generate.ts --check -> pass
  • ./node_modules/.bin/vp fmt --check apps/native/parity/LEDGER.md -> pass
  • node --test apps/native/parity/sync.test.ts -> 42/42 pass
  • cargo clippy --manifest-path apps/native/Cargo.toml --workspace --all-targets -- -D warnings -> pass (0 warnings)
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-core -p t3-client -> 1398 core + 8 conformance + 112 client passed
  • cargo test --manifest-path apps/native/Cargo.toml -p t3-native --features snapshot (-- --test-threads=1): sidebar::sb_380_tests (4/4), sidebar::hover::tests (4/4), updates::tests (9/9), context_menu:: (14/14), sidebar::sb_sections_pane_tests (7/7)
  • cargo build --manifest-path apps/native/Cargo.toml -p t3-native -> pass

Port remaining upstream parity for SB-ROW (`pingdotgg#36420`, `pingdotgg#31825`, `pingdotgg#34218`, `pingdotgg#34878`), SB-MENU (`pingdotgg#29025`, `pingdotgg#32507`, `pingdotgg#31418`, `pingdotgg#36527`), and SB-UPDATES (`pingdotgg#33538`, `pingdotgg#35327`, `pingdotgg#32924`), and mark all three rows done in apps/native/parity/LEDGER.md.

- Add shared server-clock tracking (crates/core/src/clock.rs, ServerConfig.server_time, Environments snapshot sync) and wire sidebar working durations, activity timestamps, and removed-checkout badge cleanup.
- Update auto-settle menu labels to Follow settings / Never, show Thread actions unavailable toast on unloaded threads, drop routine copy-success toasts, and implement async regenerateTitle flow with lastTitleRegeneration and outcome toasts.
- Refresh providers across connected manageable fleet servers on updates dialog open with Checking for more... state, show restart reconnect nudges, and skip already-updated servers on Retry.

Implemented with Gemini 3.1 Pro / Antigravity.
… SB-UPDATES

- Monitor checkout repo existence for local sidebar rows (`without_removed_checkout`) and query VCS status for worktree checkouts in hover cards (`pingdotgg#34878`).
- Clear selection immediately and dispatch bulk title regenerations concurrently (`pingdotgg#31418`).
- Fall back to `AppState::thread_shell` for header/sidebar context menus on project-filtered loaded threads (`ThreadMenuOwner::allows`, `ContextMenu::open_thread`, `AppState::snapshot_thread`).
- Deduplicate concurrent `UpdateControl::refresh_providers_for_dialog` waves with an in-flight token (`pingdotgg#33538`).
- Add offscreen update checking dialog snapshot harness and regression coverage in `sb_380_tests`, `hover::tests`, and `updates::tests`.
…tings menu actions

- Expose `AppState::snapshot_thread` within `crate` so `SidebarPane`'s `ContextMenuEvent::Delete` confirmation handler and `ContextMenu::activate`'s `ProjectSettings` handler resolve project-filtered loaded threads from `thread_shell` instead of no-oping.
- Extend `removed_checkout_strips_row_badges_and_header_menu_works_when_project_filtered` to assert both `Delete` confirmation and `ProjectSettings` modal opening succeed when the active thread is filtered out of `sidebar.model`.
… and snooze planning

- Use `snapshot_thread` in `AppState::thread_title` and `AppState::request_archive_thread` (`apps/native/crates/app/src/dialog.rs`) so project-filtered loaded threads preserve confirmation prompts and titles.
- Use `state.snapshot_thread(id)` in `SnoozeRequest::resolve_ids` (`apps/native/crates/app/src/snooze_dialog.rs`) so `Snooze` and `Unsnooze` stay enabled on project-filtered header menus.
- Restore `ProjectScope::default()` (and `confirmThreadArchive: false`) at the end of `removed_checkout_strips_row_badges_and_header_menu_works_when_project_filtered` so subsequent tests do not inherit persisted scope state.
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.

1 participant