Skip to content

Link documents to tasks from the TUI - #105

Merged
MJohnson459 merged 1 commit into
mainfrom
feat/tui-doc-links
Aug 1, 2026
Merged

Link documents to tasks from the TUI#105
MJohnson459 merged 1 commit into
mainfrom
feat/tui-doc-links

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Adds the TUI surface for document links, taking the picker option rather than a
documents screen — the cheaper of the two candidates and the one closest to
where the need bites.

c on a selected task opens a picker over every registered document, with the
ones the task already cites ticked, and ⏎ links or unlinks the highlighted one
in place. The picker stays open on the refreshed list so several can be toggled
in one visit, and it is reachable from all three places a task is selected: the
cockpit, the task browser, and the browser's detail popup — which it returns to
on esc with the reading scroll intact. With nothing registered it reports
voro doc add on the status line instead of opening empty.

The list spans every project's documents rather than the task's own, since a
task in any project may cite any plan (DESIGN.md §3); the task's own project's
come first and the rest carry their owner's name so two plans sharing a filename
stay apart. Registration stays a CLI affair — a rarer, wordier act with no pull
toward the queue — so this picker is the whole of the TUI's librarianship and no
documents screen was built. DESIGN.md §8's scope-cut sentence is rewritten to
say exactly that.

voro-core gains no write path: the picker calls the same link_doc/
unlink_doc the CLI verbs do, so every toggle is event-logged as before, and
the existing read-only doc lines are unchanged. The picker's ticks are read from
the per-refresh link map the detail panes render, so the two cannot disagree.

Verification

cargo test --workspace (250 + 248 pass), cargo clippy --workspace --all-targets -- -D warnings clean, cargo fmt --all applied. Four new tests
cover the toggle round-trip, cross-project ordering, the empty case, and the
detail-popup return. Also driven live against a scratch database in tmux:
linking from the cockpit and unlinking from the detail popup both land in
voro show and the event log.

Note on the branch

feat/tui-doc-links stacks on feat/doc-links (task #267, PR #100), which is
not yet merged to main. It should be reviewed and merged after that one; the
diff against feat/doc-links is four files and touches no voro-core code.
Nothing is pushed — the branch and its worktree are local at
.claude/worktrees/task-268-tui-doc-links.

Document links shipped CLI-only, and the scope cut said so: the TUI
rendered a task's documents and edited none of them, keeping the cockpit
about attention rather than librarianship. The cut held for registration
and does not hold for linking. The moment a link most wants making is
while triaging a proposal in the queue — exactly where the operator
already is — and dropping to a shell to run `voro doc link` there is
friction the read-only lines make visible without relieving.

So `c` on a selected task opens a picker over every registered document
with the ones the task already cites ticked, and enter links or unlinks
the highlighted one in place. The picker stays open on the refreshed
list, so several can be toggled in one visit, and it is reachable from
all three places a task is selected: the cockpit, the task browser, and
the browser's detail popup, which it returns to on esc with its scroll
intact. On the cockpit that includes a proposal folded inside a digest
row, once the digest is expanded; the digest row itself names no task,
so the key correctly does nothing there and the hint line omits it.

The list spans every project's documents rather than the task's own,
since a task in any project may cite any plan; the task's own project's
come first, where a triage most often reaches, and the rest carry their
owner's name so two plans sharing a filename stay apart. Registration
stays a CLI affair: it is a rarer, wordier act — a location, a title,
sometimes a repo — with no pull toward the queue. That is also why this
picker is the whole of the TUI's librarianship and there is no documents
screen; a document's own row remains `doc list`/`doc show`.

`voro-core` gains no write path — the picker calls the same `link_doc`
and `unlink_doc` the CLI verbs do, so every toggle is event-logged as
before. Marks are read from the per-refresh link map the detail panes
render, so the picker's ticks and those lines cannot disagree.

Verified against a scratch database driving the real TUI: linking from
an expanded proposal and unlinking from the detail popup both land in
`voro show` and the event log, and with nothing registered the picker
reports `voro doc add` on the status line instead of opening empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KfkU9yj3w4tMmydrWUcxbs
@MJohnson459
MJohnson459 merged commit e640bb7 into main Aug 1, 2026
6 checks passed
@MJohnson459
MJohnson459 deleted the feat/tui-doc-links branch August 1, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant