Skip to content

perf: reduce chat and page stalls with on-demand agent details - #3834

Merged
kev1n77 merged 11 commits into
openBitFun:mainfrom
kev1n77:fmy/perf
Nov 9, 2026
Merged

kev1n77 merged 11 commits into
openBitFun:mainfrom
kev1n77:fmy/perf

Conversation

@kev1n77

@kev1n77 kev1n77 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Long chats and retained pages repeatedly recalculated styles, layout and derived data, while the agent catalog waited for complete capability data before displaying cards. This change reduces that work and shows the catalog before loading complete details.

  • Narrow transcript/GenUI style invalidation, isolate retained scene renders, suspend inactive layout measurements, and consolidate typography reads before creating an editor.
  • Display agent cards first, batch skill and manageable-subagent summaries, and load complete tool/skill/subagent detail data on demand. Coalesce concurrent reads and retain pending detail selections during refresh.
  • Preserve loaded gallery content and skill-market pagination during background refresh, with workspace/device scope checks for asynchronous results.
  • Publish built-in skills through the staging directory's physical parent, with backup/rollback and complete-manifest reuse for Windows AppData redirection across volumes.
  • Preserve reading rows when settled first-attempt records omit item metadata or restore coalesced blank lines. Display identities remain stable while raw content and canonical bookmark coordinates stay authoritative.

Type and Areas

Type: Performance improvement and bug fixes.

Areas: Web UI, design-system styles, Rust core, desktop and CLI host adapters.

Motivation / Impact

Reduce stalls during long-session updates, page switching, first editor initialization and agent catalog entry while preserving scrolling, reading position, editor models, unsaved content and undo history. Optional summary fields retain legacy-host fallback behavior.

At 1463 x 823 CSS pixels / DPR 1.75, three Windows native runs measured medians of 0.408 s for the agent list, 0.678 s for summaries, 0.580 s for first details, and 0.164 s for returning to the list. Deferring complete capability reads moves some work into first detail opening.

Verification

  • pnpm run capabilities:generate, pnpm run capabilities:check, pnpm run capabilities:test (16 tests), pnpm run website:test (9 tests), and pnpm run website:build passed. The generated Tauri command map includes the optional skill summary parameter.
  • pnpm run check:web passed, including appearance/theme checks and TypeScript checking.
  • Focused Vitest suites passed: 525 original check executions and 239 handoff/scroll regression check executions. These suites overlap; the latter includes four added regression cases.
  • Rust skill discovery, mode-count, generation-order and path suites passed during implementation. The final revision additionally passed the following commands (9 built-in skill tests and 15 path tests):
pnpm run fmt:rs
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,file-watch --lib agentic::tools::implementations::skills::builtin::tests
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,file-watch --lib infrastructure::app_paths::path_manager::tests
  • Native Windows desktop / WebView2: 43 state checks passed using the same fixed 100-turn session. An appended turn executed four shell commands and four file edits through the native runtime against deterministic loopback SSE, persisted all 300 paragraphs, and preserved the original 100 turns. Checks cover sidebar return, returning while generating, completion while away, reading anchors, drafts, editor text/caret/selection/scroll/model identity, and undo/redo. The UI source is unchanged since these native runs.
  • git diff --check passed. A merge-tree check against current upstream/main found no conflicts.
  • Static GitHub YAML validation passed for 17 files. Three shell release-fixture tests failed in the local Windows environment: missing jq, drive paths passed to tar, and command-stub resolution reaching real gh.

Reviewer Notes

Native verification covers local Windows only. Live SSH workspaces, Peer Device Mode, remote control and detached dispatch were not exercised; mocked remote/surface tests are not live transport evidence. Occasional long frames during generation/navigation remain.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, including environment limitations.
  • Existing localization keys are reused and owner documentation is updated where applicable.

Scope GenUI sibling spacing and agent-row child sizing to reduce layout invalidation during transcript updates.
…layout

Memoize retained scene content and pause overview sizing observers while inactive, refreshing dimensions on reveal.
…iewports

Coalesce mutation and resize measurements into one frame and retain interaction leases while inactive, refreshing them on reveal.
Resolve editor and inlay fonts after asynchronous configuration loading and before model and view writes to reduce forced layouts.
Canonicalize staged bundle paths and publish with backup and rollback, allowing cross-volume AppData installations and reusing complete manifests.
Share failed or partial discovery results among readers of the same load while allowing later requests to retry.
…shots

Resolve mode skill counts from one discovery and policy snapshot, expose optional summaries through desktop and CLI hosts, and retain legacy response support.
Calculate manageable subagent counts with the mode catalog and expose optional count fields through desktop, CLI and frontend adapters.
Publish agent cards before summaries and defer complete tool, skill and subagent data until details open. Coalesce detail requests and retain pending selections and dialog state during refresh.
Refresh retained pages without replacing content with loading skeletons. Preserve loaded skill-market pages and isolate asynchronous results by workspace and device surface.
Accept omitted first-attempt metadata only when a single settled attempt is explicit. Retain display section identities across blank-line restoration while preserving raw content and canonical bookmark coordinates.
@kev1n77
kev1n77 merged commit 12ae468 into openBitFun:main Nov 9, 2026
13 checks passed
@kev1n77
kev1n77 deleted the fmy/perf branch November 9, 2026 08:14
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