← Back to Pull requests

feat(desktop): focus previews with a shared composer and progress card #5482

Closed
unknown closed this pull request without merging on Sep 24, 2026 02:17 UTC
View on GitHub
unknown unknown commented on Sep 18, 2026 08:46 UTC
Author

Summary

Files and Browser can focus the preview while retaining the same mounted composer, draft and attachments. Drag the center divider left or use the focus control; restore returns to the original split width. WorkHub and focused previews share ProgressCard and the Working / Paused / Needs attention / Finished vocabulary.

Fixes #5469. Workspace-reference opening remains tracked by #2664.

Review changes

1. Escape exits focus without stopping execution. The composer offers Escape to its preview host after local popup handling. The explicit Stop button retains its normal behavior. Native testing verified that the model continued after Escape restored the split.
2. Preserve reading position. Completed replies first open at the beginning; live output follows only while the reader stays at the end. Collapse and minimize/restore preserve the selected offset. Focus attributes now remain stable during height measurement, avoiding the transient narrow layout that displaced the reader during restore.
3. Explain bounded content and open the full conversation. The 16,000-character and 12-item limits show a partial-content notice. The expanded card always offers “View full conversation”, restoring the split and passing the relevant turn to existing conversation navigation.
4. Continuous container width. The composer uses the available container width up to 960px, with no 990px viewport override. Native 990px and 991px windows retain the same composer height. Long Git branch labels shrink before reaching Send/Stop.

The default now contains just the compact status row and composer; reply details expand on demand. Main has been merged and the conflicts resolved.

Real application captures

These are actual macOS Electron window screenshots with a live provider, using the local Codex connection and gpt-5.6-terra / medium. Prompts were sent through the actual composer. The model generated the HTML with Write and produced the long reply and real Bash calls. No mocked backend or seeded reply supplied these captures. The Browser loads a real native WebContentsView.

Full illustrated acceptance notes

Compact default and completed reply

!Compact status and retained draft

!Completed reply starts at the beginning, with truncation notice and full-conversation action

Reading position before → after minimize/restore

The same Weather paragraph and Gear heading remain at the same position, together with the unsent draft.

!Reading position before minimizing

!Reading position after restoring

990px → 991px native window

!990px window

!991px window

<details>
<summary>Escape, full conversation, native Browser and explicit Stop</summary>

Escape restores the split while the real turn continues.

!Running turn after Escape

View full conversation restores the split and targets the corresponding turn.

!Full conversation

The native webpage leaves room for the composer, including at 720px.

!Native Browser

!720px Browser window

Explicit Stop retains received content and displays Paused.

!Stopped turn retaining received text

</details>

Current verification

Head 8467f1e5c merges main 9082cf144, resolves the Astryx inventory conflict, and records 295 covered files with 2 reviewed exclusions. The reviewed composer-host guard, pointer-only focus, sibling status region, Escape routing, reading-position retention, bounded-content notice, and continuous-width behavior remain intact. Workspace build:test and typecheck, renderer architecture, Astryx inventory, the 102 protocol/epoch tests, and the production Storybook build pass locally. The catalog smoke passed every focused-preview, workbar, WorkHub, file-preview, and browser-preview story; its only reproducible failure is the unrelated Design System/Functional Motion Spinner animation assertion outside this PR's touched components. Hosted CI passed on this exact updated head.

Prior verification

  • Full GitHub CI passed for 0fc0491ee, including the native desktop tests and Storybook interaction checks.

  • The native WorkHub menu test closes the popup on its owning window. Preview scroll restoration runs after the parent applies its focused width; the original 360px regression assertion is retained.
  • Real native application: generated HTML, divider focus, draft retention, completed-reply first position, reply collapse, composer minimize/restore, both truncation bounds, full-conversation navigation, local-menu Escape, composer Escape during execution, explicit Stop, webpage input and window resizing.

  • Desktop production build; renderer and Storybook TypeScript; changed-file Biome; renderer architecture; locale hygiene; Astryx inventory; staged source-header checks passed.
  • Existing preview rendering and security limits remain unchanged. Dedicated Office/CSV/Notebook viewers remain outside this change.

    AI use

  • No generative tool made a substantive contribution

  • Generative tooling made a substantive contribution
  • Codex implemented and reviewed the changes, operated the real app, captured the screenshots and wrote the description. GPT-5.6 Terra generated the test document and replies. Commits include Generated-by: Codex; human review is required before merging.

    Checklist

  • Regression coverage updated for the changed interactions

  • Changed-code checks and native acceptance listed above completed

  • Behavior changes illustrated with real-provider application captures
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: M4n5ter Review duration: 8251m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5482"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%
    Repository