Repository navigation
fix: keep large team and Activity overviews responsive - #1919
Merged
Merged
Conversation
santoshkumarradha
marked this pull request as ready for review
October 24, 2026 16:27
santoshkumarradha
added a commit
that referenced
this pull request
Oct 24, 2026
* Keep large teams overviews responsive with indexed membership reads * Document large teams responsiveness fix for PR 1919 * Use supported chat surface in change entry * Bound Activity history copies and share each paint reading * Wait for resized terminal geometry before pointer acceptance
santoshkumarradha
added a commit
that referenced
this pull request
Oct 24, 2026
Takes dev's team/Activity scale fixes, Activity memory and store perf work, multiline prompt history and keyboard copy, and the tidy passes. app/v3 keeps its features: the teams spend result cache now reads membership through dev's shared spendTeamsFile; the command table stays in internal/slashcat (dev's comment tidy applied there); autonomyKinds keeps session.AutonomyKinds() under dev's comment; PERF.md takes dev's trimmed guide plus app/v3's own bounds (DisplayEntry 328, factory, process actions, harness list, media lookups). dev's new comment law (internal/commentlaw) flagged five app/v3-only comments (dated rulings, a vendor name, a home-like path); they now say the behaviour only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
All teams could stall every hover as membership grew. CPU profiling attributed about 98% of the overview's samples to repeated reporting-home membership searches. Background spend reads compounded the problem by reloading and repairing the same teams file once per pool.
This replaces repeated searches with indexed membership repair and one lazy reporting-home reading per paint. Summary counts and manager titles no longer construct full member rows. The global-manager card shares the same reading. Spend reads retain one immutable membership snapshot for the most recently used profile, invalidated by the current primary/legacy file stamp; ledger appends continue through the existing incremental ledger reader. Reporting policy and cap behavior are unchanged.
Activity/history had a related per-paint cost: unchanged task rows were copied on every filtering read, layouts were rebuilt for multiple readers of the same paint, and tree construction repeatedly walked parent chains. The reading now keeps row identities as indexes, copies task/chat slices only when deletion removes a row, pre-sizes sibling storage, memoizes ancestry validity, and shares filtered layouts during one body's paint. Paint scratch is discarded before the next input or engine update.
How it was checked
Paired actual terminal runs used the same mock data, a 160×55 terminal and 12 alternating pointer targets. Timings measure input delivery until the changed hover hint is visible. Fixture construction, the first overview frame and model latency are separate; latency runs made zero model calls.
Fixture construction was approximately 0.46–0.54 seconds for 10,000 memberships and 2.30 seconds for 40,000. These are diagnostic observations, not machine-independent timing gates or a claim of constant-time rendering.
Separate CPU redraw benchmarks improved from 678 to 13 ms at 10,000 memberships and from 3,067 to 26 ms at 20,000. A selected team with 1,000 members redraws in approximately 4.7 ms.
deepseek/deepseek-v4.1-flash, including auxiliary calls.make pr-readyand all final-head GitHub CI gates passed (build, vet, formatting, laws, backend and TUI tests). The local classifier reproduced the existingTestLowCreditReadSwapsOnlyAnUntouchedImplicitConversationfailure on unchanged dev; this PR does not claim to fix that unrelated test.Reproduce after
make build:The capacity tests use a local fixture endpoint and reject model calls. The live workflow requires a configured OpenRouter key. Before/after comparisons use the same capacity-test file with each revision's built application.
Activity/history was measured separately with 40 mock project histories and 5,120 tasks. Twelve alternating pointer targets wait for the selected row's distinct visible door hint. Navigation makes zero model calls.
Filtering to a uniquely named chat preserves its full family; clearing, folding, and resizing pass. New race-tested regressions cover unchanged-row sharing, deletion/restoration without mutating the held snapshot, paint lifetime, filtering, resize, and 300 malformed parent graphs compared against independent ancestry walks. Home hover already reuses its painted hit map; that path did not need a new cache. The existing teams live acceptance now waits for the narrow-screen navigation after resizing before clicking a member, preventing old wide-frame coordinates from being used against the new layout.
Additional reproduction:
Use the same benchmark/test fixture with each revision's built application for paired comparisons. Terminal setup and model time are excluded from hover measurements. Activity's first-page polling is too coarse to support an opening-speed claim; the measured hover samples use 5 ms screen polling.
Checklist
Merged into dev as
a43c63bd7. The merged revision was built with clean revision metadata and passed the actual 5,120-task terminal workflow again. Post-merge median/p95 hover was 75/98 ms; timing variability is expected. Task worktrees and generated build files were removed after verification; measurement logs remain available locally.