Skip to content

fix(web): batch rapid stage clicks into one git command and one refresh - #104

Open
MTVaught wants to merge 1 commit into
mainfrom
t3code/batch-stage-clicks
Open

MTVaught wants to merge 1 commit into
mainfrom
t3code/batch-stage-clicks

Conversation

@MTVaught

Copy link
Copy Markdown
Owner

Problem

Every stage or unstage click in the diff panel became its own vcs.stagePaths call followed by a full preview regeneration (status plus two diffs). Staging many files quickly queued up dozens of git processes on the server and could overload it.

Fix

Clicks that arrive while a command is running are merged into the next one. The queue drains in batches, at most one stage and one unstage call per pass, and the preview refreshes once when the queue is empty. Per-file pending state, the optimistic hide, and the failure toast behave as before.

Follow-up to #100 and #102.

Built with Claude Fable 5.1 via Claude Code in T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 20, 2026
@github-actions

Copy link
Copy Markdown

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.6 KiB +96 B (+0.7%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +4 B (+0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +92 B (+1.4%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 57.0 KiB +822 B (+1.4%) 66.4 KiB ✅
Codex Live turn messages 8 8 0 (0.0%) 21 ✅
Claude Total thread wire 13.6 KiB 13.6 KiB +43 B (+0.3%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +2 B (+0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB +41 B (+0.6%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.8 KiB 57.8 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 8 9 +1 (+12.5%) 21 ✅

Baseline: 1fd3553 · PR result: 3ce66d7 · 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.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 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