Skip to content

refactor(web): share bulk thread deletion between sidebars - #10106

Merged
t3dotgg merged 1 commit into
mainfrom
t3code/debt-gzuf-8-sidebar
Sep 6, 2026
Merged

refactor(web): share bulk thread deletion between sidebars#10106
t3dotgg merged 1 commit into
mainfrom
t3code/debt-gzuf-8-sidebar

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Sep 5, 2026

Copy link
Copy Markdown
Member

Both sidebar layouts keep their own bulk-delete loop. #4615 had to fix both copies so one failed deletion would not stop the remaining threads.

Use one shared loop for both layouts. It counts only successful deletions for shared-worktree checks, continues ordinary failures, and stops on interruption. Menus, confirmation dialogs, layout choice, and selection cleanup stay in their existing callers.

Verification

  • 153 focused sidebar, selection, and worktree tests pass.
  • Web typecheck and formatting pass.
  • Targeted lint passes with warnings in unchanged code.
  • Both disposable sidebar browser checks passed. No visual change is intended.

Browser verification

Both sidebar layouts passed Cancel and Confirm checks with disposable local threads. Cancel kept both selected threads. Confirm deleted only the two selected threads. Unselected threads and navigation remained available. A final confirmation check on the combined build kept the same dialog in both layouts.

Before uses main at 0c200c5. After uses the combined PR build at 8316ed24a9. Screenshots show confirmation only. The separate behavior checks exercised deletion.

Current sidebar

Before: current sidebar confirmation

After: current sidebar confirmation

Legacy sidebar

Before: legacy sidebar confirmation

After: legacy sidebar confirmation

Created with GPT-6 Astra in Codex.

Note

Share bulk thread deletion logic between LegacySidebar and Sidebar

  • Adds deleteSelectedThreadEntries helper in Sidebar.logic.ts that processes entries sequentially, tracks successful keys, preserves the first failure, stops on interruption, and skips null results
  • Refactors SidebarProjectItem in LegacySidebar.tsx and the bulk-delete flow in Sidebar.tsx to call the shared helper instead of inline deletion loops
  • Adds tests in Sidebar.logic.test.ts covering ordering, failures, interruption, and skipped entries
  • Behavioral Change: Sidebar now treats threads missing from threadByKeyRef as skipped (null) entries rather than failing; error toast still reports only the first failure

Macroscope summarized da8035f.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 73a4d50

Macroscope's review found this PR approvable — This is a contained refactor that centralizes already-existing bulk thread deletion behavior for both sidebars, with focused tests covering its result handling. Existing deletion and worktree-cleanup semantics remain accounted for, with no defaults, schema, infrastructure, or static-analysis overrides changed.

No code changes detected at da8035f. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +10 B (+0.1%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −2 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.5 KiB +12 B (+0.2%) 7.8 KiB
Codex Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 8 8 0 (0.0%) 21
Claude Total thread wire 13.6 KiB 13.6 KiB −9 B (−0.1%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB +5 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.5 KiB −14 B (−0.2%) 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 57.8 KiB −44 B (−0.1%) 66.4 KiB
Claude Live turn messages 10 9 −1 (−10.0%) 21

Baseline: 7544d3d · PR result: da8035f · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.8 KiB
  • Claude decoded thread snapshot: 114.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@t3dotgg
t3dotgg force-pushed the t3code/debt-gzuf-8-sidebar branch from 73a4d50 to da8035f Compare September 6, 2026 09:12
@t3dotgg
t3dotgg merged commit dd64072 into main Sep 6, 2026
26 checks passed
@t3dotgg
t3dotgg deleted the t3code/debt-gzuf-8-sidebar branch September 6, 2026 09:15
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 6, 2026
## What's Changed
* feat(usage): pool subscription limits per provider across accounts and environments by @juliusmarminge in pingdotgg/t3code#10300
* chore(web): remove usage limits demo fixtures by @juliusmarminge in pingdotgg/t3code#10330
* fix(web): expose error disclosure state by @saphid in pingdotgg/t3code#10125
* fix(web): name the editor picker accurately by @saphid in pingdotgg/t3code#10124
* fix(web): make task row states readable by @saphid in pingdotgg/t3code#10128
* fix(web): explain hosted connection prerequisites by @saphid in pingdotgg/t3code#10129
* fix(web): name combobox chip removal targets by @saphid in pingdotgg/t3code#10127
* fix(marketing): present the Git workflow as an illustration by @saphid in pingdotgg/t3code#10130
* feat(mobile): pool usage limits across selected environments by @juliusmarminge in pingdotgg/t3code#10334
* fix(release): space automatic nightlies at least six hours apart by @t3dotgg in pingdotgg/t3code#10272
* refactor(web): share bulk thread deletion between sidebars by @t3dotgg in pingdotgg/t3code#10106
* refactor(client): share tool outcome rules by @t3dotgg in pingdotgg/t3code#10122
* refactor(server): share Claude result status and error mapping by @t3dotgg in pingdotgg/t3code#10296
* fix(server): settle inactive threads without a PR lookup by @t3dotgg in pingdotgg/t3code#10103
* fix(ssh): report remote stop failures without losing ownership by @t3dotgg in pingdotgg/t3code#10105
* perf(server): stop scanning old OpenCode parts by @t3dotgg in pingdotgg/t3code#10116
* perf(server): avoid full thread reads on turn start by @t3dotgg in pingdotgg/t3code#10108
* perf(web): skip checkpoint map rebuilds while streaming by @t3dotgg in pingdotgg/t3code#10118
* perf(server): skip plan bodies in thread summaries by @t3dotgg in pingdotgg/t3code#10341
* fix(server): skip disabled provider instances for text generation fallback by @t3dotgg in pingdotgg/t3code#10346
* fix(server): capture checkpoints before refreshing PR status by @t3dotgg in pingdotgg/t3code#10347
* fix(web): keep manual panel choices during a turn by @t3dotgg in pingdotgg/t3code#10113
* fix(threads): keep completed requests closed across clients by @t3dotgg in pingdotgg/t3code#10123
* perf(server): finish runtime messages without full thread reads by @t3dotgg in pingdotgg/t3code#10120
* refactor(server): let adapters declare context compaction by @t3dotgg in pingdotgg/t3code#10112
* fix(server): link thread PRs without an open client by @t3dotgg in pingdotgg/t3code#10101


**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260906.1293...v0.0.39-nightly.20260906.1303

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260906.1303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant