Lutra/docs/ui-parity.md
danny 9801a346b6 H5: banner-aligned themes, diagnostic and VCS tokens
Both themes follow the README banner without taking it over: calm,
near-neutral surfaces (cream-tinted light, faintly plum-tinted dark),
the raspberry only as the accent, retuned syntax colours and the
terminal on the editor surface. Approved by the owner from before/after
screenshots.

New tokens `--lt-diag-error|warning|info|hint` (lint underlines, gutter,
tooltips, Problems icons) and `--lt-vcs-added|modified|deleted|untracked|
ignored|conflicted` (for M4.4), listed in `theme::DIAGNOSTIC_TOKENS` and
`theme::VCS_TOKENS`. Completion kind icons take the syntax colour of
their kind. The contrast test checks every new colour (4.5:1 text,
3:1 icons) in both themes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 13:58:38 +01:00

18 KiB
Raw Blame History

UI parity checklist

Status: main window layout (M1.5), project tree running against the engine (M1.4), editor tabs with a CodeMirror editor (M1.6), light and dark themes (M1.10), restore dialog for unsaved changes (M1.7), notification toasts (M1.12), command palette and global keymap (M1.8), settings dialog with search (M1.9b), syntax highlighting and editor.reveal (M2.2), Find tool window in the bottom panel (M2.4), go-to popup (M2.6), left stripe and Structure tool window (M2.7), app menu (M3.9), Terminal tool window and bottom panel tabs (M3.6), Problems tool window and editor diagnostics (M3.3), completion, quick documentation and parameter info (M3.4), string and path settings with completion and tooltip settings (H4), banner-aligned themes with diagnostic and VCS colours (H5) · Last updated: 2026-10-25

  • Main window: tool window stripes, editor area, status bar, navigation bar
    • M2.7 (2026-10-17): a left stripe with one tab per left tool window (Project, Structure); the shown one is marked, clicking it again hides the window. Still missing: right docking, several bottom tool windows, drag to rearrange, navigation bar, layout persistence.
    • M1.5 (2026-10-14): left tool window with header, hide button, collapsed stripe with a show button, resizable by pointer and keyboard; editor area placeholder; status bar. Missing: stripes with several tool windows, bottom/right docking, navigation bar, layout persistence. Not checked in the running app yet (needs M1.4).
  • Main menu
    • M3.9 (2026-10-19): a slim header bar with a menu button (Lucide menu) top left; its dropdown lists every command with a menuPath (engine and UI), grouped File, Edit, View, Go, Help in Lutra's own order, with shortcuts; disabled entries dimmed and not runnable. Keyboard: Alt+M (menu.open, also over uiCommand), arrows, Home/End, Enter/Space, Escape/Tab, type-ahead. An exclusive modal and launcher (one-modal rule). Vitest; live check on Windows 11 (port 7939). Missing: a display-mode option (always visible menu bar), native macOS menu bar, submenus and separators, an Edit group (no edit commands yet), an About window. Behaviour notes: plan/phpstorm/14-main-menu.md.
  • Project tool window (tree, scroll from source, file operations)
    • M1.5 (2026-10-14): tree of the open folder with lazy project.children listings, folders and PHP files with Lucide icons, ignored/excluded entries dimmed, keyboard navigation (WAI-ARIA tree: arrows, Home/End, Enter), double-click opens, refresh on TreeChanged, listing errors shown in the tree, empty state with Open Folder…. Vitest only, against a mocked engine.
    • M1.4 (2026-10-15): runs against the real engine in the app: projects open from the folder picker or the command line, the tree updates live when files change on disk; checked with ui.screenshot on Windows 11. M1.13 (2026-10-16): a partly listed folder ends with a "Listing truncated" note; opening a file that is already open (tree, control channel) switches to its tab (Vitest; live check pending (gaming mode)). Missing: scroll from source (Select Opened File), expand/collapse all, views list, sort options, speed search, file colours, file operations. Behaviour notes: plan/phpstorm/02-project-view.md.
  • Editor tabs (pin, split, reorder, close others)
    • M1.6 (2026-10-15): tab bar above a CodeMirror 6 editor; files open from the project tree (Enter, double click) next to the active tab, or from engine events (control channel, page reload); click and Left/Right activate, the close button, a middle click and Mod+W close; a dot marks unsaved changes; closing a dirty tab asks Save / Don't Save / Cancel; Mod+S saves, Mod+Alt+S saves all (shortcuts read from the engine's command specs); a non-blocking notice when a dirty file changes or disappears on disk. Checked with ui.screenshot on Windows 11 and Vitest. Missing: preview tab, pin, split, reorder by drag, close others/all, reopen closed tab, tab limit, tab context menu, recent-files switcher, duplicate-name disambiguation. Behaviour notes: plan/phpstorm/03-editor-tabs.md.
  • Editor syntax highlighting (Lutra's own colours, no copied scheme)
    • M2.2 (2026-10-16): the language is picked from the file extension when a tab opens: PHP (with the HTML, CSS and JavaScript around <?php blocks), HTML, CSS, JS/TS, JSON, YAML, Markdown; other files stay plain. Eleven syntax tokens (--lt-syntax-keyword/string/number/comment/variable/function/type/constant/tag/attribute/operator) in both themes, each ≥ 4.5:1 on the editor background and the active line. editor.reveal {path, line, column} (UI command, palette, control channel) opens the file, activates the tab, places the cursor and centres it. Checked in the app on Windows 11 (bundled UI, control channel): PHP with embedded HTML in dark and light, editor.reveal into a closed CRLF file (last line, then line 302 centred). Vitest; keystroke to highlight on a 1 MB PHP file 3.0–11.4 ms median (jsdom, JavaScript work only, measured, not yet in the WebView). Missing: semantic highlighting (from the language server), a colour scheme editor, more languages (XML, SQL, Twig, Blade, .env), font styles (bold/italic) per token.
  • Restore dialog for unsaved changes after a crash
    • M1.7 (2026-10-16): modal dialog after a project opens when the recovery journal holds unsaved texts: files with the time they were journaled and a hint when the file changed on disk since; Restore All, Restore Selected (the others stay listed), Discard; Escape keeps the journal for the next open; restore failures listed. Catalog strings, --lt-* tokens, Vitest (10 tests). Live check pending (gaming mode). Missing: a diff against the disk version, local history. M1.15: a restore or discard from elsewhere (control channel) removes the settled files and closes the dialog when none are left; the dialog waits behind the palette and the settings dialog. Behaviour notes: plan/phpstorm/04-recovery.md.
  • Command palette / search everywhere
    • M1.8 (2026-10-16): command palette (Mod+Shift+P) over every user-facing command, engine and UI (commands with a menu path or default shortcut, plus UI commands): fuzzy ranking on the label and the id (prefix, word prefix, word starts, substring, in-order characters), recently run commands first, shortcuts shown, disabled commands dimmed and not runnable, arrow keys, Enter, Escape, focus returned on close; a failing command raises an error toast. One global keymap (ui/src/commands/) matches every command's default shortcut by key code; UI commands palette.open, settings.open (Mod+,, opens the settings dialog since M1.9b) and view.toggleProjectTree (Mod+1). Vitest (keymap, ranking, store, palette, App); live check pending (gaming mode). Missing: files, classes, symbols and text tabs (search everywhere), settings in the results, synonyms and abbreviations, inline toggles, assigning a shortcut from the palette, recent commands across restarts. M1.15: one modal at a time; running any command (also as a uiCommand) closes the palette, opening the palette closes the settings dialog and the close question. Behaviour notes: plan/phpstorm/05-palette.md.
  • Settings dialog with search
    • M1.9b (2026-10-16): dialog (Mod+,, palette, control channel) built from settings.list: sections on the left, controls by type (select, number with min/max, switch), labels and descriptions from the catalog, search over label, description, key and section with matches grouped by section, Reset to default per setting, changes applied at once with inline errors, live updates on settingsChanged, theme picker (appearance.theme, switches at once), editor font size applied to the editor; Escape closes, focus trapped, every control reachable by Tab. Vitest (14 tests); live check pending (gaming mode). Missing: a tree of nested categories, project-level settings and their marker, modified markers, highlighting matches, export/import, more settings (keymap, code style, inspections). Behaviour notes: plan/phpstorm/06-settings.md.
    • H4 (2026-10-24): every string setting gets a text field (applied on Enter or leaving it; refused in place with a catalog hint for quotes or spaces around a path, control characters, more than 4,096 bytes); a path setting (key ending in path/executable: php.executable, phpactor.path, and M4.1's git.executable without UI changes) also gets "Browse…" with the native file picker and "Detected automatically" while empty; string rows stack the field under the text at full width. New Editor settings: completion auto popup, completion popup delay, documentation tooltip delay, read live by the editor. settings.open {section?, query?} for agents. Vitest (12 control tests, 6 live-wiring tests). Checked in the app (bundled UI, control port 7954): PHP section with both path fields, a value set over the control channel shown at once (plus the toolchain's PHP toast), the new Editor settings changed live, an out-of-range hover delay refused by the engine, search "delay"; screenshots read; the user's settings restored afterwards. "Browse…" was not clicked in the app (no synthetic input); Vitest covers it with a mocked picker.
  • Keymap editor (Lutra's own default keymap; no copied keymaps)
    • M1.8 (2026-10-16): the global keymap built from the default shortcuts of engine and UI commands; no user keymap and no editor yet.
  • Light and dark themes from theme tokens
    • M1.10 (2026-10-16): Lutra Dark and Lutra Light from Rust tokens, switched live through appearance.theme (no reload), system follows the OS preference, the first frame uses the stored theme; the editor (selection, active line, cursor, gutter, matches), tabs and notices have their own tokens; WCAG AA contrast checked by Vitest for every text pair in both themes. Covered by Vitest DOM and control-channel tests; live check pending (gaming mode). M1.9b: theme picker in the settings dialog, editor font size from editor.fontSize. Missing: a theme command in the palette, the native title bar following the theme, colour scheme editor, high-contrast theme.
    • H5 (2026-10-25): both themes follow the README banner, approved by the owner from before/after screenshots (tree, PHP editor, Problems, terminal, palette, settings; Windows 11, bundled UI, control port 7955): cream-tinted light theme, faintly plum-tinted dark theme, raspberry only as the accent, retuned syntax colours, the terminal on the editor surface. Diagnostics get their own colours (--lt-diag-*: error, amber warning, blue info, muted hint) in the underline, gutter dot, tooltip stripe and Problems icon; --lt-vcs-* status colours for M4.4; completion kind icons coloured by kind. Every text colour ≥ 4.5:1 and icon colour ≥ 3:1 in both themes (Vitest contrast test).
  • Notifications and background task indicator
    • M1.12 (2026-10-16): toasts at the bottom right for engine and host notifications (corrupt settings and journal entries at startup, folder that cannot be opened, unsaved_changes when switching projects, file watching stopped, failed commands without their own UI): info dismissed after 5 s, warnings and errors stay until closed, close button and Escape, at most 5 visible with "+n more", role="status"/role="alert"; startup notifications are replayed when the page starts listening. Vitest (19 store and component tests); live check pending (gaming mode). Missing: a notification log / Notifications tool window, actions inside a toast, balloon grouping, "don't show again", background task indicator with progress.
  • Structure tool window
    • M2.7 (2026-10-17): in the left tool window, chosen from the new stripe (Project | Structure); the active tab's declarations (namespaces, class-likes, functions, methods, properties, constants, enum cases) as a WAI-ARIA tree with Lucide kind icons in syntax colours and the short signature; follows the active tab and edits; click or Enter jumps to the name (editor.reveal), arrows walk and fold, collapsed nodes kept per file; empty states for no file, no declarations, still reading, too large. view.toggleStructure Mod+2. Checked in the app on Windows 11 over the control channel (tree, jump to a method, tree updated after an edit; no clicks, the control channel cannot send input). Missing: speed search, sorting and filters, visibility markers, inherited members, autoscroll from the caret, the File Structure popup, VCS colours, running tests from an entry.
  • Problems tool window
    • M3.3 (2026-10-21): a Problems tab in the bottom panel (next to Find and Terminal): the language server's diagnostics of every reported file, grouped by file (name, directory, count), errors first, then by position; each row with a Lucide severity icon in a token colour (error --lt-error, warning --lt-accent, info and hint --lt-fg-muted), the message, source and code, and the 1-based position; a status line with totals or the server state (starting, restarting, failed, not running). Click or Enter reveals the position (editor.reveal), arrows / Page / Home / End move. problems.open Mod+Alt+P (Lutra's own), menu View/Problems. In the editor: wavy underlines per severity, a gutter dot and the message with source and code on hover (CodeMirror lint, tokens only), mapped through edits until the next publication. Diagnostics come from Phpactor, not from Lutra's own inspections. Vitest; live check with the real Phpactor on Windows 11. Missing: a current-file tab or filter, severity filters, sort and group options, quick-fixes (code actions), the editor's problem counter, scrollbar marks, next/previous problem. Behaviour notes: plan/phpstorm/11-problems.md.
  • Code completion popup, quick documentation, parameter info
    • M3.4 (2026-10-22): CodeMirror's completion list with Lutra's triggers, a Lucide icon per kind (with the kind's catalog name as tooltip), the matched characters in --lt-accent, detail on the right, documentation beside the list; quick documentation as a tooltip on hover (350 ms) and on editor.quickDocumentation Mod+I; parameter info above the cursor with the active parameter bold in --lt-accent, a counter for overloads and the parameter's documentation; editor.complete and editor.parameterInfo in the palette and the Edit menu. Markdown rendered without HTML, tokens only. Checked in the app with the real Phpactor (screenshots). Missing: the documentation popup's toolbar and links, a documentation tool window, type info, completion settings beyond auto popup and delays (case sensitivity, sorting). H4: auto popup on/off, popup delay and hover delay from Settings › Editor, applied live to open editors. Behaviour notes: plan/phpstorm/12-completion.md.
  • Go to file / class / symbol popup
    • M2.6 (2026-10-17): one popup with Files / Classes / Symbols tabs (Tab / Shift+Tab or a click; the text stays), opened by goto.fileOpen Mod+P, goto.classOpen Mod+Alt+C, goto.symbolOpen Mod+T (Lutra's own keys) or by an agent with {query}; live fuzzy results (60 ms debounce, stale answers dropped) with matched characters marked, a Lucide icon per kind, the directory, namespace or container beside the name, library (vendor) rows dimmed with a label; an indexing hint with progress, re-queried on indexReady; arrows / Page keys move, Enter or a click opens through editor.reveal, Escape or a click outside closes; an exclusive modal. Checked in the running app. Missing: recent files on an empty query, a non-project toggle, file-type filter, :line suffixes, preview, more tabs (actions, text), sending results to Find.
  • Find tool window
    • M2.4 (2026-10-17): docked in the new bottom panel (resizable by pointer and keyboard, collapses to its header, closes; results kept while closed). Query field with case / whole word / regex toggles (aria-pressed), include and exclude globs, status line with counts and time, cancel, truncated hint, refused query as an alert; results grouped by file with the match highlighted, a listbox with keyboard navigation; Enter or click reveals the match. find.open Mod+Alt+F. Missing: tabs per search, grouping options, a preview pane, expand/collapse per file, rerun and next/previous occurrence buttons, context menu, export, history.
  • Terminal tool window
    • M3.6 (2026-10-18): a Terminal tab in the bottom panel (the panel shows Find and Terminal as tabs while both are open; Left/Right switch); xterm.js with the fit addon follows the panel size; several terminals as sub-tabs (Local, Local (2)…) with a close button each and a new-terminal button, Left/Right/Home/End/Delete on a sub-tab, an ended shell dims its tab and prints its exit code; output survives collapsing the panel; copy with Mod+Shift+C or Ctrl+C on a selection, paste with Mod+Shift+V or Ctrl+V; while a terminal has the focus plain Ctrl keys go to the shell and only Mod+Shift / Mod+Alt shortcuts reach Lutra; Lutra's own ANSI palette in both themes (text colours ≥ 4.5:1). terminal.open Mod+Shift+T. Missing: renaming and splitting tabs, a context menu, search, clickable links and paths, drag and drop, a key back to the editor, a confirmation before killing a running process, terminal settings.
  • Git tool window

Revision history

Date Change Summary
2026-10-25 minor Themes: banner-aligned palettes, diagnostic and VCS colours, completion icon colours (H5)
2026-10-24 minor Settings dialog: string and path controls, completion and tooltip settings (H4)
2026-10-22 minor Completion popup, quick documentation and parameter info partial (M3.4)
2026-10-21 minor Problems tool window partial, editor diagnostics (M3.3)
2026-10-19 minor Main menu partial (M3.9)
2026-10-18 minor Terminal tool window partial, bottom panel tabs (M3.6)
2026-10-17 minor Go-to popup partial (M2.6)
2026-10-17 minor Structure tool window partial, left stripe (M2.7)
2026-10-17 minor Find tool window partial, bottom panel (M2.4)
2026-10-16 minor Editor syntax highlighting partial; editor.reveal (M2.2)
2026-10-16 patch Palette and restore dialog: modal rule, restore dialog follows outside restores (M1.15)
2026-10-16 minor Settings dialog partial; theme picker and editor font size (M1.9b)
2026-10-16 minor Command palette and global keymap partial (M1.8)
2026-10-16 minor Notifications partial (M1.12)
2026-10-16 minor Truncated listing note, re-open switches tab (M1.13)
2026-10-16 minor Restore dialog (M1.7)
2026-10-16 minor Themes partial (M1.10)
2026-10-15 minor Editor tabs partial (M1.6)
2026-10-15 minor Project tool window runs against the engine (M1.4)
2026-10-14 minor Notes on main window and project tool window (M1.5)
2026-10-13 major Baseline