Skip to content

Wayfinder: one way per concept — consistency rules, refactored on touch #2142

Done
9 of 13 issues completed

Description

@yw0nam

Destination

Each concept the code handles in more than one way gets one canonical way and a guard that fails new code taking another way. For every area below, the rule, where it is written, and its guard are decided, and the guards are filed as build issues. Existing code moves to the rule when a change touches it.

Notes

  • Why: the same concept is handled differently from module to module, so the blast radius of a feature or a fix differs every time and is hard to predict. Found by a read-only consistency audit of main at 70bbe5d (2026-11-26, six areas). Most inconsistencies are shortcuts that held under an older single-case assumption: one pet window is exactly her box, one character open, one monitor scale, one chat transport, TS and Rust edited together. Nothing shared the definition and nothing tested across the cases, so drift failed nothing.
  • Work order (owner): refactor on touch. No sweep migration: a change that touches code in an area moves that code to the area's rule. Guards ratchet: existing violations sit in a baseline that only shrinks; new ones fail CI.
  • Entry point: The character shakes sideways for a moment each time the Character menu opens (cause measured: the pet window's left edge moving during a resize).
  • The owner reads decisions as Korean replies and visual Artifact pages; issue text stays English. Skills: yui-dev-workflow, yui-runtime-evidence, grilling, domain-modeling.

Decisions so far

  • Scope and recurrence guards for pet-window resizes and several open characters: one owner for pet-window size changes; with several characters: fix the delegation-history key and the unified-chat idle clock now, duplicate greetings via the proactive admission point, device-wide cues to the main character, a storage-key registry and a two-window test.
  • Measure: an overlay window's first frames and a Ctrl+wheel resize: an overlay window created ahead and shown without focus appears and hides with no frame of her moved or blank (12/12); creating it visible on demand showed a partial first frame 3/27.
  • TS and Rust: one source for shared names and limits: ts-rs for types and string-enum error codes; one shared JSON file (read by Rust at build time, imported by TS) for names, labels and limits, as the client tool list already does; tauri-specta waits on a released Tauri 2.x.
  • Refactor on touch: where the rules live and how a guard ratchets: every rule is an entry in one CI check script (concept, owner, forbidden patterns, shrink-only baseline, reason); owners verified to exist; touching a file with baseline entries requires fixing them (label escape); library or type first; review-checklist line and a pre-release audit cover what checks cannot see.
  • Character menu: its own overlay window or growing to the right: B — one pre-created menu window for the app, state and actions over one bridge channel, no pet-window resize for the menu (widening and upward growth both go), movement while open unchanged (held; a drag or agent move closes it), focusing show measured first, existing menu modules reused.

Not yet specified

  • Smaller duplications the audit found outside the areas above: UI patterns built several ways (popover, radio group, confirm, listbox), motion lengths split between CSS tokens and JS constants, clocks injected in some modules and read directly in others, settings range and unit policies (clamp vs reject, ms vs s vs min). Whether they become areas of their own or ride on the ratchet ticket's mechanism.
  • How each area's guard splits into build issues once its rule is decided.

Out of scope

Sub-issues

Sub-issues

9 of 13 Issues completed
Loading 13 sub-issues

Activity

  1. added
    wayfinder:map
    on Nov 26, 2026
  2. changed the title [-]Wayfinder: pet-window edge jumps and several open characters[/-] [+]Wayfinder: one way per concept — consistency rules, refactored on touch[/+] on Nov 26, 2026
  3. yw0nam commented on Nov 30, 2026

    @yw0nam
    OwnerAuthor

    Four settings-panel follow-ups found while #2173 rebuilt the pages. Counts are from git grep on feat/2173-quick-start-agents at 32d84afa (2026-11-30); they move to main when #2178 merges, and each is re-counted there before its spec. Work starts after #2178 merges, one small PR per item (owner, 2026-11-30).

    1. Switch rows are drawn two ways. Voice, Together, Motion and Proactive draw on/off rows from the descriptor table src/ui/quick-controls/switch-row.ts through switches/descriptor-row.tsx (DescriptorRow: voice/voice-page-view.tsx, together/together-page-view.tsx, motion/motion-page-view.tsx, proactive/source-group.tsx). Listening draws the same row by hand in listening/listening-page-view.tsx (SwitchRow, VoiceRow, BargeInRow, BubbleRow). switch-row.ts:55-61 still holds createBubblePersistRow with tab: "listening", and git grep 'tab === "listening"' has no hit.
    Decision (owner, 2026-11-30): one shared switch-row component that every page uses directly; the descriptor table is deleted.

    2. Each page exposes a different lifecycle to the panel. Connection: refresh, entered, windowFocused, focusKey, focusChatType, commit, close. Voice: refresh, entered, commit, close. Listening: entered, close. Motion: refresh, close. Proactive: refresh. Together: reflect. General: none. The panel calls them in quick-controls.ts (tab select 749-752, open 773-786, close 793-798, dispose 823-830). In #2173 the Voice page's commit-on-close had no test until a reviewer deleted the call and nothing failed.
    Decision (owner, 2026-11-30): every page uses the same names with fixed meanings: refresh() reads the stored values when the window opens, entered() runs when its tab shows, close() keeps unsaved input and stops running work when the window closes (today's commit folds into it). Together's reflect becomes refresh. Connection's focus methods stay its own.

    3. A parent reaches a child through ad hoc handle objects. { current: null } appears on 17 lines in 8 files under src/ui/quick-controls (connection/connection-page.ts, connection/detail/detail-settings.tsx, listening/listening-page.ts, listening/stt-server/stt-section.tsx, quick-controls.ts, sections/server-line/server-line.test.tsx, voice/server/voice-server-section.tsx, voice/voice-page.ts), each with its own name and shape.
    Decision (owner, 2026-11-30): React's createRef / RefObject with useImperativeHandle everywhere.

    4. The check result lines keep the Quick start prefix in shared code. yui-start__checking, __dot, __err, __err-text and __fade appear 60 times in 15 files (45 in 12 files under src/, 15 in 3 mocks), rendered by shared sections/key-entry/paste-key-row.tsx and by the Connection and Voice pages; the fade keyframes live in connection/quick-start/quick-start.css.
    Decision (owner, 2026-11-30): rename to yui-check__* with the rules and keyframes in one shared sheet; proved by a before/after pixel comparison.

    Guard. Decision (owner, 2026-11-30): the first of these PRs also builds one CI check in scripts/ci/ for the one-way-per-concept rules, with a shrink-only baseline, holding only the rules these items set.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:map

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions