Skip to content

refactor(ui): own desktop keyboard in Solid - #174143

Merged
steipete merged 1 commit into
mainfrom
solid2/w-idiom-components-desktop-keyboard
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-idiom-components-desktop-keyboard

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Desktop mobile keyboard listeners and textarea access still used a manually managed class after the panel moved to Solid.

User Impact

No intended user-visible change. Composed typing, paste modifiers, trusted focus changes, control handoff, and native close before mounting retain their existing behavior.

Why This Change Was Made

Create the keyboard inside the panel's Solid owner, capture its textarea with a ref, and dispose listeners and retained modifier state with that owner. The textarea owns its sentinel and composed-text value; rendering no longer rewrites it. The existing connection owner continues to admit remote input synchronously. The old class and forwarding props disappear together.

Evidence

Proof Result
UI typecheck Passed
Mobile keyboard suite 3/3 passed; 9.23 s runner wall time
Desktop client suite 27/27 passed; 7.28 s runner wall time
Targeted lint, format, diff check Passed
Production Knip Passed; 4m 8.4s, no new ignores
Independent review Final P0–P2 review completed scoped-clean
Full UI, E2E, real-Gateway Exact-head CI 38891679119: all selected checks pass except the five unrelated Models-layout cases and downstream aggregate.
Paired performance Passed; startup JS 339,202 B gzip/7 requests; CSS 38,786 B/1 request, unchanged CSS. Chat boot −3 B; new-chat boot +33 B.

The behavior suites ran once. Later changes only clean up identifiers/braces, return listener cleanup directly from onSettled, and remove redundant untrack from component setup; final lint and review cover those changes. No local broad suite, E2E, parity or remote lease. No startup imports, lazy boundaries, tags, classes or visible layout changed, so no local build or screenshots; CI supplies the startup-byte proof above. The job reports candidate startup JS but no separate base startup-JS total; no base JS number is inferred.

Touched production metric Before After
LOC 1,313 1,307
Controller/lifecycle checklist lines 1 1
createEffect 1 1
createRenderEffect 0 0
untrack 1 0
addEventListener 4 2
DOM queries, including typed queries 3 2
Hand-built class strings 0 0
Production flush 0 0
runWithOwner / getOwner 0 0

Metrics compare the five touched production files with fd1511568e8160d9193c5364dbabb830719da5d5. Production decreases by 6 lines; test LOC is 494 → 510 (+16). The keyboard class is removed, although its name did not match the controller checklist. The remaining panel controller and its commit fence are outside this focused keyboard cut.

The five failures are Models settings layout and discovery > Models page keeps controls separate and publishes discovery into a passive picker at {1440,1100,768,640,390}px in model-providers-layout.e2e.test.ts. They compare six expected roles with seven rendered roles, including “Utility Fallback Model.” Feature #173906 is already in tested baseline d455830f9bff6ff0e978d0c452f700c4a60f1a78; the page, locale, assertion and fixtures are byte-identical in tested merge a8b03edd2d7554c6f2ed9b82b54f6941c2e0358b. Scheduled-main 38887900861 predates that feature and passed UI, so this is unrelated-source evidence, not a matching-main failure claim. E2E6/9 passed 95 other files/433 cases. Native admin evidence preserves the red aggregate and admits only this unrelated failure.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 16, 2026
@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.

@steipete
steipete marked this pull request as ready for review October 16, 2026 11:07
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T11:11:09.717225Z 08cf62f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. 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 moves desktop keyboard setup, textarea access, and cleanup into the Solid panel owner.

Example: Dispose a desktop panel after holding Shift in its Keyboard field.

  • Before: The keyboard class relies on explicit reset calls to clear modifier state.
  • After: Solid owner disposal clears modifier state and removes the window listeners.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is source-clean and preserves meaningful tests; direct runtime evidence is limited, and the inherited CI failure remains for native landing disposition.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the ordinary contributor proof gate; supplied validation consists of focused tests and CI, with no current-head live keyboard demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No intended visible change; keyboard lifecycle ownership remains manual after the panel's Solid migration.
Reason: The maintainer-authored direction completes a focused ownership cutover with less production code and no new configuration or public API.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored lifecycle refactor is coherent, and no introduced correctness or security defect was found.

Priority: P3
Reviewed head: 08cf62f522e9212f29f3d5862f3dc25ee1c486cb

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI keyboard bridge translates textarea edits and keyboard events into input for the current authenticated desktop connection.

flowchart LR
  A[Desktop document textarea] --> B[Solid keyboard owner]
  B --> C[Connection handoff owner]
  C --> D[Desktop client]
  D --> E[noVNC remote desktop]
  F[Solid disposal] --> B
Loading

Technical review

Best possible solution:

Keep keyboard listeners and textarea state with the Solid panel while the existing connection owner controls remote input.

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

This is a behavior-preserving refactor; source confirms the legacy ownership pattern, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The implementation follows the existing Solid lifecycle pattern, removes the replaced class and adapters together, and preserves synchronous connection admission.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Keyboard class extraction changes intended behavior with a stated reason (e5fca42: The keyboard bridge was extracted from the oversized desktop panel as a self-contained concern; this commit does not establish when the underlying typing behavior originated.)
  • Literal paste and modifier reconciliation keeps the original intent (d5e6183: Allow local clipboard text while releasing and restoring held modifiers and reconciling physical releases.)
  • Retired connection release keeps the original intent (e3b9b38: Full reset must drop the keyboard's retired connection reference without requiring another input event.)
  • Solid panel and textarea rendering changes intended behavior with a stated reason (89564fa: Move panel rendering to Solid while preserving synchronous connection owners and noVNC DOM ownership; this PR explicitly moves keyboard cleanup to that owner and makes textarea edits DOM-owned.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 639a57c adds ui/src/components/desktop/desktop-panel-solid.tsx:12 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 639a57cfa74b; files: ui/src/components/desktop/desktop-panel-solid.tsx)
  • Vincent Koc: Raw commit e3b9b38 adds ui/src/components/desktop/desktop-mobile-keyboard.ts:58 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e3b9b3810976; files: ui/src/components/desktop/desktop-mobile-keyboard.ts)

PR surface

Source -6, Tests +16. Total +10 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 85 91 -6
Tests 2 61 45 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 146 136 +10

Review metrics

Metric Value Why it matters
Production versus test LOC Production −6; tests +16 The conversion reduces production code and extends existing retention coverage to owner disposal.

Labels

Label changes:

  • add P3: Focused internal lifecycle cleanup with no intended user-visible behavior change.
  • 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:

  • P3: Focused internal lifecycle cleanup with no intended user-visible behavior change.
  • 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, 7:24 AM ET / 11:24 UTC.

@steipete
steipete merged commit 7621a15 into main Oct 16, 2026
157 of 162 checks passed
@steipete
steipete deleted the solid2/w-idiom-components-desktop-keyboard branch October 16, 2026 11:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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 ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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