Lutra/ui/tests
danny a212a44490 M3.4: completion, hover and signature help from Phpactor
Engine (crates/engine/src/cmd/lsp_assist.rs), on M3.5's pending outcomes:
- lsp.completion {id, position, triggerCharacter?}: items with label,
  kind, detail, Markdown documentation, insertText, textEdit,
  additionalTextEdits, sortText; sorted, capped at 500 (cut lists are
  incomplete), snippets turned into plain text.
- lsp.hover {id, position}: Markdown contents and range.
- lsp.signatureHelp {id, position}: signatures with UTF-16 parameter spans.
- The request is queued after every didChange; the answer is converted
  in the reply callback, off the engine lock. Positions are checked
  against the buffer. Server strings and lists are capped.
- lutra-lsp-fake answers completion and signature help.

Editor (ui/src/components/editor/assist/):
- Completion source with Lutra's triggers (identifiers, $, ->, ?->, ::,
  namespace \; not in strings or comments unless asked), the server's
  ranking as boost, text edits and imports applied in UTF-16 (CRLF too),
  Lucide kind icons.
- Hover documentation (350 ms) and editor.quickDocumentation (Mod+I).
- Signature help on ( and , following the cursor; editor.parameterInfo.
- editor.complete.
- Lutra's own Markdown renderer without HTML (XSS-tested), tokens only.
- Requests wait for the buffer sync to be idle and use runWaiting.
- New dependency @codemirror/autocomplete (MIT, already transitive).

Tests: 6 engine tests against the fake server, 9 unit tests, an ignored
real-Phpactor latency test, 29 Vitest tests; palette and menu tests list
the new UI commands.

Measured with the real Phpactor (Windows 11, debug build, 25 ms tick):
- Completion 61-109 ms while typing (median 76 ms; ~107 ms in the app).
- Hover and signature help ~16 ms median.
- A useful list 2.3 s after opening a file in a 20-class project, ~65 s
  for 2,000 classes (indexing).
- Phpactor 56-71 MB working set, ~6% of one core while typing.

Live-checked in the app on port 7934. Docs: Code completion 0% -> 5%
(est.), feature depth ~4.1% -> ~4.6%, breadth 26/155, architecture, G6,
ui-parity, language-parity, roadmap, README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:38:07 +02:00
..
commands M1.15: one modal at a time, restore dialog follows outside restores 2026-10-16 21:49:38 +02:00
editor M3.4: completion, hover and signature help from Phpactor 2026-10-22 18:38:07 +02:00
find M2.4: Find tool window in a new bottom panel 2026-10-17 12:42:53 +02:00
goto M2.6: go-to popup for files, classes and symbols 2026-10-17 17:35:50 +02:00
i18n M3.3: engine wiring for Phpactor and diagnostics 2026-10-21 18:58:32 +02:00
layout M1.5: main window layout and project tree against mocked engine events 2026-10-14 19:24:23 +02:00
menu M3.4: completion, hover and signature help from Phpactor 2026-10-22 18:38:07 +02:00
notifications M1.12: notifications as toasts 2026-10-16 16:20:45 +02:00
palette M3.4: completion, hover and signature help from Phpactor 2026-10-22 18:38:07 +02:00
problems M3.3: engine wiring for Phpactor and diagnostics 2026-10-21 18:58:32 +02:00
project M1.13: watch open buffers' folders, bufferFocused, truncated tree row 2026-10-16 16:20:11 +02:00
recovery M1.15: one modal at a time, restore dialog follows outside restores 2026-10-16 21:49:38 +02:00
settings M1.9b: settings dialog with search 2026-10-16 21:13:04 +02:00
structure M2.7: Structure tool window and syntax.outline 2026-10-17 17:04:12 +02:00
terminal M3.6: integrated terminal with PTY sessions and xterm.js sub-tabs 2026-10-20 21:10:37 +02:00
theme M3.6: integrated terminal with PTY sessions and xterm.js sub-tabs 2026-10-20 21:10:37 +02:00
App.test.ts M2.7: Structure tool window and syntax.outline 2026-10-17 17:04:12 +02:00
ipc.test.ts M3.5: pending outcomes for commands that wait for the language server 2026-10-22 06:36:20 +02:00
ipcEvents.test.ts M1.12: notifications as toasts 2026-10-16 16:20:45 +02:00