fix(focus-zone): preserve input editing inside active zones#302
fix(focus-zone): preserve input editing inside active zones#302RtlZeroMemory merged 2 commits intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughDocumentation clarifies Changes
Sequence Diagram(s)sequenceDiagram
participant Client as User / Client
participant Engine as RouteEngine
participant InputRouter as routeInputEditingEvent
participant KeyRouter as routeKeyWithZones
participant Widget as Widget/onInput
participant Router as RoutingEmitter
Client->>Engine: key event (kind: "key")
Engine->>InputRouter: routeInputEditingEvent (early)
alt InputRouter handles as InputEditingOutcome
InputRouter->>Router: emit action: "input" (payload)
Router->>Widget: onInput callback with updated value + cursor
Engine-->>Client: stop further routing (return)
else Not handled
Engine->>KeyRouter: routeKeyWithZones (fallback)
KeyRouter->>Engine: routing outcome (focus change or other)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/widgets/focus-zone.md`:
- Around line 25-27: The examples still show multiple direct children (which now
trigger a legacy column fallback); update the opening usage example, the
navigation examples, and the grid example to wrap multi-child zones in explicit
layout widgets (e.g., Column, Row, or a Grid container) instead of providing
siblings directly so the docs reflect the new guidance about avoiding direct
multi-child zones and no longer imply the legacy column fallback.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: faa8440d-a2cb-4ad6-ae81-8233376a46de
📒 Files selected for processing (3)
docs/widgets/focus-zone.mdpackages/core/src/app/__tests__/widgetRenderer.integration.test.tspackages/core/src/app/widgetRenderer/routeEngineEvent.ts
Summary
Focused text inputs inside active focus zones now keep arrow-key editing priority, and the focus-zone docs now clarify the existing multi-child layout fallback.
Problem
Active focus-zone routing ran before shared input editing, so focused inputs and textareas inside an active zone could lose arrow-key editing to zone traversal.
Root cause
routeEngineEventhandled generic zone key routing before handing key events to the shared input editor, which let active zones consume arrow navigation intended for text editing.Fix
Route focused input key editing before generic zone routing, keep the existing zone traversal path for non-text widgets, add regressions for input and textarea editing inside active zones, and clarify the single-child transparency versus legacy multi-child column fallback in the docs.
Tests
npm run lint
npm run typecheck
npm run build
node scripts/run-tests.mjs --filter "widgetRenderer.integration.test.js"
node scripts/run-tests.mjs --filter "focus.zones.test.js"
node scripts/run-tests.mjs --filter "layout.focusZone.test.js"
node scripts/run-tests.mjs
Notes
No zone-navigation redesign is included here; this only changes precedence so focused text editing wins inside active zones.
Summary by CodeRabbit
Documentation
Bug Fixes
Tests