Skip to content

Speed cold session loads#1049

Merged
SuuBro merged 48 commits into
masterfrom
goal/speed-cold-ses-9de2e50f
Jul 26, 2026
Merged

Speed cold session loads#1049
SuuBro merged 48 commits into
masterfrom
goal/speed-cold-ses-9de2e50f

Conversation

@SuuBro

@SuuBro SuuBro commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • request cold-session transcripts immediately after WebSocket authentication, independently of side-panel REST hydration
  • deduplicate initial workspace hydration while preserving reconnects, cached switching, stale-navigation guards, revisions, tabs, proposals, and review documents
  • harden restricted-session WebSocket writes and add regression coverage for title, task, model, control, and extension paths
  • document controlled 321-message timing evidence and the remaining transcript-render scaling bottleneck

Validation

  • implementation workflow: build, typecheck, unit, browser, E2E, review, security, and QA passed
  • documentation review passed
  • cold-session DOM regression: 11/11 passed
  • restricted-session WebSocket integration: 3/3 passed
  • controlled median navigation-to-ready: 267.590 ms before → 5.835 ms after with a 250 ms workspace delay
  • initial workspace requests: 2 before → 1 after

🤖 Generated with Bobbit

SuuBro and others added 30 commits July 24, 2026 08:34
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/test-engineer-d362:
  test: reproduce cold session load ordering

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-6ef8:
  Guard active workspace compatibility mirror

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-9cf3:
  Unblock cold transcript hydration

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/test-engineer-f1d5:
  test: cover delayed hydration lifecycle races

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-212e:
  fix(ws): enforce session write policy

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-8138:
  Fix delayed hydration lifecycle races

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-8138:
  Reconcile submitted review after hydration

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/test-engineer-9a05:
  test: fix cached agent identity typecheck

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-b79b:
  Guard stale session setup continuations

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-66f0:
  Close restricted session WS bypasses

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/test-engineer-db6f:
  test: cover pre-bind stale navigation

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-4d3e:
  Block restricted session model controls

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-0215:
  refactor ws work message classifier

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/coder-792b:
  Restore cold-loaded review documents

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
* goal/9de2e50f/test-engineer-a601:
  test: faithfully cover review restoration

Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
SuuBro and others added 18 commits July 24, 2026 12:45
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown

Greptile Summary

Speeds cold-session transcript loading while strengthening session restrictions.

  • Requests transcripts immediately after WebSocket authentication and defers initial workspace hydration until the chat agent is bound.
  • Adds session-keyed stale-navigation, cache-preservation, workspace-reconciliation, and revision-conflict handling.
  • Enforces read-only and non-interactive policies across authenticated WebSocket work commands.
  • Adds DOM and integration regressions plus protocol and timing documentation.

Confidence Score: 5/5

The pull request appears safe to merge with no concrete changed-code failure identified.

The revised hydration order remains guarded by session generation and keyed workspace state, while the WebSocket policy classifier covers the current mutating command set and preserves read and safety-control paths.

Important Files Changed

Filename Overview
src/app/session-manager.ts Reorders cold-session setup around immediate transcript requests while adding generation checks, cached-session preservation, and early interaction restrictions.
src/app/remote-agent.ts Removes duplicate initial workspace hydration and reconciles submitted-review tabs after initial and reconnect hydration.
src/app/side-panel-workspace.ts Keeps compatibility mirrors session-scoped and adds compatible DELETE settlement plus bounded revision-conflict retry support.
src/server/ws/handler.ts Adds centralized authenticated enforcement for read-only and non-interactive session work frames with correlated extension errors.
tests2/dom/cold-session-workspace-ordering-repro.test.ts Covers transcript-before-workspace ordering, stale navigation, reconnect hydration, cache reuse, and submitted-review reconciliation.
tests2/integration/session-ws-write-policy.test.ts Verifies restricted-session policy across agent, queue, metadata, model, task, permission, and extension write paths.

Sequence Diagram

sequenceDiagram
  participant UI as Session Manager
  participant WS as Remote Agent / WebSocket
  participant Chat as Chat Panel
  participant REST as Workspace REST API
  UI->>WS: Connect and authenticate
  WS-->>UI: auth_ok
  UI->>WS: get_messages
  WS-->>UI: Transcript snapshot
  UI->>Chat: Bind transcript-bearing agent
  UI->>REST: Hydrate side-panel workspace
  REST-->>UI: Session-keyed workspace
  UI->>REST: Reconcile submitted review tabs
Loading

Reviews (1): Last reviewed commit: "Merge protocol documentation corrections" | Re-trigger Greptile

@SuuBro
SuuBro merged commit 042a7db into master Jul 26, 2026
7 checks passed
@SuuBro
SuuBro deleted the goal/speed-cold-ses-9de2e50f branch July 26, 2026 16:33
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