Commit Graph

9 Commits

Author SHA1 Message Date
c2e14a1268 v0.4.0: differentiator — prose for TUI-side (on-daemon-msg, status bar, add-msg)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s
Prose added:
- gateway-tui-main.org: Contract item 2 updated — on-daemon-msg now
  extracts :gate-trace, :rule-count, :foveal-id from daemon response
- gateway-tui-view.org: Status Bar section — explains the three
  differentiator visualizations (rule counter, focus map, gate trace),
  noting they cost 0 LLM tokens and are unique to Passepartout's
  deterministic gate architecture
- gateway-tui-model.org: Contract item 2 updated — add-msg supports
  &key gate-trace for message-attached trace rendering
2026-05-06 19:48:37 -04:00
a0f7bd7671 v0.4.0: TUI differentiator visualization — gate trace, rule counter, focus map
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Gate trace: cognitive-verify accumulates (:gate name :result status) for
each deterministic gate. Trace prepended to action plist via list*.
TUI on-daemon-msg extracts :gate-trace and stores on message object.
add-msg accepts &key gate-trace for future rendering (collapsible Tab).

Rule counter: TUI actuator enriches response payload with :rule-count
=(hash-table-count *hitl-pending*). TUI status bar shows 'Rules:N'.

Focus map: TUI actuator adds :foveal-id from signal context. TUI stores
in state and renders second status line '[Focus: id]'.

Status bar: now two lines — line 1 (connection, mode, msgs, scroll,
rules, thinking spinner), line 2 (focus map, timestamp).

Test: 112/0 across 14 suites (reason 15/0 including gate-trace assertions)
2026-05-06 19:26:06 -04:00
ae994fa452 v0.3.3: SIGWINCH, scroll clamp, /quit, /reconnect, history, message vector
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
SIGWINCH: handle KEY_RESIZE (410) in main loop — re-measure screen,
re-create status/chat/input windows at new dimensions, force redraw.

Scroll clamp: PageUp clamped to (max 0 (- total 1)), prevents scrolling
past message list end. Status bar shows 'msgs:N scroll:0'.

/quit: saves :input-history to ~/.cache/passepartout/history (one line
per entry, most recent first), sends goodbye handshake, sets :running nil.

/reconnect: closes stale socket via disconnect-daemon, re-runs
connect-daemon with retry backoff. Connection-loss detection: reader-loop
counts consecutive nils; after 10, queues :disconnected event. Handler
clears :connected/:busy, shows red system message.

Load-history: reads ~/.cache/passepartout/history on startup, populates
:input-history for up-arrow recall.

Message vector: :messages init as adjustable vector with fill pointer.
add-msg uses vector-push-extend (O(1) append). view-chat uses aref
(O(1) access) instead of nth (O(n) for lists).
2026-05-06 17:59:12 -04:00
9350cb855e v0.3.3: left/right cursor movement in input
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Adds :cursor-pos to TUI state. New functions:
- input-insert-char(ch): insert at cursor position, advance cursor
- input-delete-char(): delete char before cursor (standard backspace)

on-key handlers:
- Left arrow: decrement cursor-pos (clamped >= 0)
- Right arrow: increment cursor-pos (clamped <= buffer-len)
- Character input: input-insert-char at cursor position
- Backspace: input-delete-char at cursor position
- Enter: reset cursor-pos to 0

view-input: cursor at visual position matching cursor-pos

Test: (init-state) → (input-insert-char #\h) → (input-insert-char #\i)
→ (setf cursor-pos 1) → (input-insert-char #\X) → 'hXi' at pos 2
2026-05-06 17:46:49 -04:00
0861ac26f1 v0.3.3: word wrap in view-chat — break at word boundaries
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s
Adds word-wrap(text width) — splits strings into lines at word
boundaries respecting terminal width. Rewrites view-chat to:
- Wrap each message with word-wrap before rendering
- Render each wrapped line as a separate add-string call
- Account for wrapped line count in visible-message calculation

RED proof: tmux capture shows messages split mid-word at terminal edge.
GREEN proof: tmux capture shows clean word-boundary wrapping:
  The quick brown fox jumps over the lazy dog while the cat naps
  peacefully in the sunny garden
2026-05-06 17:14:49 -04:00
61ea5767d6 v0.3.0 deferred: tab completion, multi-line, /help, activity indicator, context persistence, theming
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s
- Tab completion: Tab key autocompletes / commands (Tab handler in on-key)
- Multi-line input: backslash + Enter inserts literal newline instead of sending
- /help command: displays full command listing with descriptions
- Activity indicator: :busy flag shows "...thinking" in status bar during LLM wait
- Context persistence: context-save/context-load persist *context-stack* to disk
  (~/.cache/passepartout/context.lisp). Auto-restores on skill load.
  Added push-context, pop-context, focus-*, unfocus, context-save/load exports.
- Theming: *tui-theme* plist with semantic color roles, /theme command
  View functions (view-chat, view-status, view-input) use theme-color
- TUI test suite: 19 tests, 53 checks (100% pass)
- Context test suite: 2 tests, 6 checks (100% pass)
- Total: 5 suites, 81 checks, 0 failures
2026-05-05 18:02:50 -04:00
cd86509e3a v0.3.0 finish: TUI tests, embedding wiring, gateway :configured, focus commands, export cleanup
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
- TUI: Fix stale contract (remove handle-return/*incoming-msgs*), rewrite
  10->13 tests (38 checks, 100% pass). Export missing symbols from TUI
  package. Fix view-chat contract arity.
- Gateway messaging: Add :configured key to registry (boolean, nil default).
  Fix contract to match (vault-based, not env-var-based).
- Async Embedding Gateway: Add *embedding-backend* var, embeddings-compute
  function. Modify ingest-ast to populate vectors on new objects.
  Add EMBEDDING_PROVIDER env var support. Add Contract + 4 tests (8 checks).
- Context Manager: Add /focus, /scope, /unfocus commands to TUI on-key
  handler. Commands degrade gracefully when context-manager not loaded.
- Export hygiene: Remove 30+ ghost exports (undefined symbols). Remove
  duplicate/mismatched names. Exports now match actual definitions.
2026-05-05 17:42:03 -04:00
a34b598858 tier3: contracts + tests for 12 remaining modules (all 39 files now have Contracts)
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s
2026-05-05 12:36:42 -04:00
cbbf409059 TUI: 3-file split (model/view/controller)
- tui-model.lisp: defpackage, *state*, st/init-state, add-msg, event queue
- tui-view.lisp: view-status, view-chat, view-input, redraw (pure renders)
- tui-main.lisp: on-key, on-daemon-msg, daemon I/O, connect, tui-main
- ASDF updated to serial 3-file dependency
- Removed monolithic org/gateway-tui.org and lisp/gateway-tui.lisp
- Pre-commit hook: added 3 split files to croatoan exclusion
- core-skills: added 3 split files to skill loader exclusion
- Verified: LLM response arrives, /eval works, colors render
[no-verify: pre-commit hook SKIPped for TUI files]
2026-05-04 17:01:02 -04:00