Skip to content

fix: show skeletons while session panels load - #178939

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/panel-loading-states
Oct 21, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/panel-loading-states

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Closes #178951

What Problem This Solves

Opening session Details, panels, and mobile subpages could show a nearly empty surface with raw “Loading…” text.

User Impact

Waiting surfaces use the existing lightweight skeletons. Loading remains named for assistive technology, and refreshes keep already loaded rows visible. Error messages and retry actions remain available.

The reported permanently loading mobile Details state did not reproduce on fresh main: both desktop and mobile settled normally. This PR fixes the loading presentation and does not claim to repair an unverified persistent-loading cause.

Why This Change Was Made

Reuse the existing list, document, and terminal skeletons at their current loading boundaries. Keep the approved layout, lazy imports, request ownership, and normal settlement timing. Remove the now-unneeded desktop flag from the shared HTML-preview loading component.

Evidence

  • Follow-up consumer validation: 68 tests in Versions, HTML preview, and HTML attachments pass (4.24s wall); their four original CI failures were reproduced first. Parent-document styles must match the canonical skeleton stylesheet, while document markup/scripts and exact sandbox-transfer checks remain protected. This follow-up changes tests only; rendered source is identical to the captured implementation.
  • 23 focused component tests pass (3.12s wall), including permission loading → rows → retained refresh/error and existing PR chunk failure/retry tests. The loading regressions fail against the original source.
  • Four production-bundle browser scenarios pass (18.64s wall). The new mobile Details scenario covers cold import, close while pending, reopen, and settlement; its measured execution is 1.45s. The new permission case takes 8ms. A final replay of the two adjusted Details cases also passes.
  • UI production and test typechecks, focused lint, formatting, lifecycle guard, and git diff --check pass. Fresh independent Codex review found no actionable P0–P2 issues.
  • Final UI build: 13.14s. Request counts remain startup 7 / Chat 25 / New 19. Gzip changes against the same base are +2 B / +37 B / −20 B respectively. The pre-existing startup budget failure remains (328,932 B against 325,166 B); this PR does not relax it.

Risk and coverage: presentation-only changes; no new CSS, state, timers, eager imports, or dependencies. Browser proof uses synthetic Gateway fixtures. Broad CI remains attached to this PR.

Desktop proof: Details docked beside the open Subagents side panel, at 2400 × 1100. The comparison uses base 05235ad0c53f1974ad1e9edd0b1dbd6dad1dd6aa and this PR's head 8d4a0a60c5cf8595be5f2b88b1f7ed276b86c04f, with the same synthetic session and opening actions. Both runs reserve the same 300 px Details column in the conversation; its frame is 1604 px wide. Only elapsed time varies. The module is held for the waiting capture, then released until the complete Details content, including pull requests, is visible. Detail crops come from their full-context PNGs.

Docked Details waiting Before After
Full context, including the Subagents side panel Before: docked Details waiting beside Subagents After: docked Details skeleton beside Subagents
Details crop Before: docked Details loading text After: docked Details skeleton

After loading completes:

Full context Details crop
Docked Details and Subagents after loading completes Complete docked Details content

The valid mobile comparisons are retained below, with the same theme, viewport, and fixture on each side:

Mobile Details waiting Before After
Mobile, light Before: Mobile, light Details waiting After: Mobile, light Details waiting
Mobile, dark Before: Mobile, dark Details waiting After: Mobile, dark Details waiting
Mobile, dark Desktop

Mobile Details after loading completes

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review October 21, 2026 02:15
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Replaces plain session-panel loading labels with existing accessible skeleton components while retaining loaded content and recovery controls.

Example: Open uncached session Details beside Subagents at a 2400 × 1100 viewport.

  • Before: The Details surface displays a small “Loading…” label.
  • After: The same surface displays list-shaped skeletons with an accessible loading status.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Direct visual proof supports the presentation change, prior findings are fixed, and the patch preserves existing ownership and recovery contracts.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected production-bundle desktop screenshots compare the same synthetic session and panel layout with the Details module held pending, showing the changed loading boundary rendering skeletons; the latest commit changes only tests.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Session panels can appear nearly empty while lazy content or initial data loads.
Reason: The maintainer-authored PR and linked issue establish direction, and the improvement reuses existing components without adding another state owner.

Merge readiness

✅ Ready for maintainer review

This PR remains useful, and both prior findings are resolved. No actionable defects remain in the reviewed diff; exact-head CI is still running.

Priority: P3
Reviewed head: 76b5aab2acb9c2735ebb9a6afd740f19eb4ea84a

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI session views consume existing request and lazy-module state, rendering loading placeholders until their owning components provide content or errors.

flowchart LR
  A[Open session panel] --> B[Existing loading boundary]
  B --> C[Shared skeleton component]
  B --> D[Lazy content module]
  D --> E[Session data owner]
  E --> F[Content or recovery controls]
Loading

Technical review

Best possible solution:

Use the existing skeleton variants at current loading boundaries while preserving lazy loading, retained rows, accessible status, and recovery actions.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the plain loading fallback, and inspected before screenshots show it at the shipped UI boundary; no target code was executed during this review.

Is this the best way to solve the issue?

The patch uses the existing presentation owner and is the smallest complete approach: replace loading markup, preserve settled and error paths, and update affected consumer assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f88c60637096.

Provenance checked

  • Details loading boundaries keeps the original intent (53fbcbb: Defer unopened Details to reduce chat boot cost while preserving waiting feedback and retained disclosure state.)
  • Responsive mobile Details and subpages keeps the original intent (1894bb9: Coordinate responsive headers, retained mobile pages, navigation, and existing domain owners.)
  • HTML preview loading keeps the original intent (9e2c766: Provide file reader controls while preserving preview, draft, save, and file identity lifecycles.)
  • Sharing, progress, process, and subagent presentation keeps the original intent (feat(ui): add responsive session headers and detail panels #176653: Compose session surfaces while leaving data, mutation authority, retention, and recovery with existing owners.)
  • Versions refresh presentation keeps the original intent (0f013a6: Keep saved branch ordering stable and distinguish loading, failed reads, and empty history.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 1894bb9 adds ui/src/pages/chat/chat-details-mobile-host-content.tsx:54 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1894bb9b0a53; files: ui/src/pages/chat/chat-details-mobile-host-content.tsx)

PR surface

Source +79, Tests +101. Total +180 across 23 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 15 181 102 +79
Tests 8 111 10 +101
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 23 292 112 +180

Root-cause cluster

Relationship: same_root_cause
Canonical: #178951
Summary: This PR implements the linked issue's structured-loading presentation request.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This improves transient loading presentation without establishing a blocked workflow or persistent loading failure.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-21T02:47:50.092Z sha 8d4a0a6 :: needs changes before merge. :: [P2] Update the Versions loading test to use its accessible status | [P2] Adapt sandbox tests for the trusted skeleton stylesheet

Reviewed October 20, 2026, 11:36 PM ET / October 21, 2026, 03:36 UTC (Revision 2).

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Both findings are resolved in 76b5aab. Versions now checks the named busy status; the HTML preview and attachment tests accept only the canonical skeleton stylesheet while preserving document isolation and exact sandbox transfer assertions. All 68 tests in the three affected files pass, and the complete corrected candidate passed independent review.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) October 21, 2026 03:33
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 48adb62 into main Oct 21, 2026
107 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/panel-loading-states branch October 21, 2026 03:42
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

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

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: replace raw session-panel loading text with structured placeholders

1 participant