Skip to content

fix: keep chat usable when link previews cannot load - #174757

Merged
fuller-stack-dev merged 2 commits into
mainfrom
fix/ci-chat-hover-20261016
Oct 16, 2026
Merged

fuller-stack-dev merged 2 commits into
mainfrom
fix/ci-chat-hover-20261016

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: chat can fail to boot when its optional link-preview runtime cannot load, and the first hover can be lost when that runtime upgrades the chat wrapper.

User Impact

Chat and About retain title hints when previews are unavailable. When previews are available, the first eligible hover opens its preview without moving the pointer again. No configuration or migration is required.

Why This Change Was Made

Keep the chat wrapper lazy and behavior-only: the existing hover owner still owns requests, timers and cleanup, but no second renderer adopts the caller-owned transcript. Regenerate the measured boot manifest so the optional runtime is no longer required for chat startup. If loading fails, release the reader hint reservation and notify the existing title owner without replaying input or retrying recursively.

This is a separate CI prerequisite for #174655 because it repairs a pre-existing loading boundary rather than expanding that menu change.

Evidence

  • Bundled browser suite: 8/8 passed, including cold first-hover pointer/node preservation, About+Chat optional-chunk failure, reader-specific pointer/keyboard fallback, fetch opt-out and touch behavior. Computed display: contents verified before and after failure against the existing boot-loaded CSS.
  • Existing hover-owner suites: 116/116 passed across six files; after the reader-fallback repair, 67/67 tooltip/title/interaction tests also passed, retaining the cold-loading reservation contract.
  • Real Gateway managed-image ordering and reconnect continuity: 2/2 passed using a verified task-private handoff SQLite path. Original image-node identity, screenshot stability and exact-once assertions were retained. These passing replays do not establish a fix for their earlier CI-only failures; no media/reconnect assertions or implementation were changed.
  • Measured boot-manifest generation and bundled UI build passed; diff whitespace check passed.
  • CI exposed unsafe interface/class merging in the native host and a shadowed route variable in the browser test. Explicit non-emitting property declarations and a callback rename fix both without changing runtime behavior or assertions. Targeted typed lint now passes with 0 warnings/errors; all 8 bundled browser scenarios pass again. Local UI typecheck still stops before source analysis because declaration preparation rejects the shared pnpm compiler path; hosted typechecks remain required.
  • Independent precommit API-only review performed with odin-autoreview (model_provider=openai_api_direct); review caught the reader-specific fallback gap, which was reproduced as a failing browser test and repaired. A fresh P0–P2 review of the two lint repairs also returned scoped-clean before commit. Whole touched browser test file audited; no assertions removed or relaxed.

Simplification: removes the Solid passthrough renderer/WeakMap path; the native host only replays pre-upgrade properties and delegates to the existing owner.

@clawsweeper

clawsweeper Bot commented Oct 16, 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.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review October 16, 2026 22:16
@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) October 16, 2026 22:20
@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. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR decouples chat startup from optional link previews and restores title hints when preview loading fails.

Example: Open Chat and hover https://example.com/field-guide while the optional preview chunk is unavailable.

  • Before: The preview runtime is a required chat dependency, so its loading failure can prevent the transcript from mounting.
  • After: Chat mounts independently, and the link retains its title hint when preview loading fails.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with meaningful browser regression coverage and no concrete finding; supplied evidence is principally harness-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its reported browser scenarios exercise the changed owners, while the inspected linked screenshots cover a separate menu change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Chat can fail to open when optional previews cannot load, and lazy activation can lose the first hover or suppress its fallback hint.
Reason: Restoring usable chat and fallback hints has clear value, and this maintainer-authored PR supplies the direction decision.

Regression provenance

Regression provenance — verified: source commit 8e95a76d9174 by Galin Iliev; canonical PR #173652 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a source-confirmed chat-loading defect still present on current main, and review found no actionable introduced bug.

Priority: P1
Reviewed head: adf38d2cb599e619468c20b2a4392e5b5109f68f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No supplied shipped-runtime trace demonstrates failed-chunk recovery and cold first-hover preservation; the reported browser runs use a mocked Gateway.
Agent review details

How this fits together

The Control UI passes pane connection, agent, session, and reader context into a behavior-only native host; the existing hover owner requests previews through the Gateway and delegates fallback hints to the shared title owner.

flowchart TD
  A[Chat pane] --> B[Native hover host]
  B --> C[Lazy preview loader]
  C --> D[Existing hover owner]
  D --> E[Gateway preview requests]
  C --> F[Shared title owner]
Loading

Technical review

Best possible solution:

Keep preview loading optional while preserving the existing hover owner, pane context, and shared title fallback.

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

Current main statically imports the optional preview implementation into Chat, establishing the failure path without executing target code; the earlier unmerged alternative also records a reproduction.

Is this the best way to solve the issue?

The patch repairs the loading and DOM-ownership boundaries directly, reuses existing preview and tooltip owners, and introduces no configuration or persisted-state change.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +57, Tests +63. Total +120 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 6 141 84 +57
Tests 1 105 42 +63
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 246 126 +120

Root-cause cluster

Relationship: canonical
Canonical: #174757
Summary: This PR carries the current repair for the eager preview dependency also addressed by an earlier unmerged alternative.

Members:

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

Labels

Label changes:

  • add P1: An optional preview-runtime loading failure can prevent the core Chat interface from mounting.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P1: An optional preview-runtime loading failure can prevent the core Chat interface from mounting.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

Reviewed October 16, 2026, 6:40 PM ET / 22:40 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit d68385d into main Oct 16, 2026
111 of 112 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/ci-chat-hover-20261016 branch October 16, 2026 22:43
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

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 P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

1 participant