Commit Graph
114 Commits
Author SHA1 Message Date
Callum Alpass d95ebadd87 Truncate work labels to fit their details 2026-11-03 01:04:24 +11:00
Callum Alpass 2418b17f20 One layout for work rows; accent user bar; reading width 2026-11-03 01:02:01 +11:00
Callum Alpass bb6d67ec1b Live status pinned above the composer 2026-11-03 00:52:35 +11:00
Callum Alpass 3a7c183e1c Pending approvals in the composer's place 2026-11-03 00:49:52 +11:00
Callum Alpass 000645909c A blank row above the composer and between the text and the model line 2026-11-03 00:49:12 +11:00
Callum Alpass 49b04f9012 Changed files under each reply, with a turn footer 2026-11-03 00:46:30 +11:00
Callum Alpass b70099f23f Make the thread right-click test independent of the date 2026-11-03 00:41:48 +11:00
Callum Alpass 356b9e5818 Bold and italic markdown in the text colour, so they show on light backgrounds 2026-11-03 00:37:16 +11:00
Callum Alpass 67c8a79275 Draft fields in a panel block; approval card on panel so its buttons show 2026-11-03 00:32:21 +11:00
callumalpass f54ea6ad42 Bundle tui3 into dist/ and run the bundle
Running the TypeScript sources makes Bun compile and keep hundreds of
vendored modules, which cost 110-130 MB at startup. scripts/build.ts
bundles bin.ts and OpenTUI's syntax-highlighting worker into dist/;
bun install builds it, bun run build rebuilds it, and the tui3 bin runs
it. bun run dev still runs the sources.
2026-11-03 00:23:45 +11:00
callumalpass 42189808f3 Exit when the terminal closes or tui3 is killed; collect garbage while idle
OpenTUI answers SIGHUP and SIGTERM by tearing the screen down without
exiting, so the session's socket kept a closed terminal's tui3 running
indefinitely. Exit once the renderer is destroyed.

Bun collects so lazily that a streaming thread took tui3 past 500 MB of
garbage while the live heap stayed near 70 MB. Run a full collection
every 30 seconds, but only after 5 seconds without input, since one
pauses for up to ~150 ms.
2026-11-03 00:23:45 +11:00
Callum Alpass c8f7a48552 Composer: left bar and element block, model line inside 2026-11-03 00:17:20 +11:00
Callum Alpass 071961ac5b Diff and pull request views: spacing, not boxes 2026-11-03 00:17:20 +11:00
Callum Alpass d6bd91872c Panels above the composer: background blocks with a left bar 2026-11-03 00:17:20 +11:00
Callum Alpass fc42f2b170 Conversation: raised blocks and bars, no rules, no repeated title 2026-11-03 00:17:14 +11:00
Callum Alpass 1a868ec10b Markdown: quiet headings and links, plan-coloured code spans 2026-11-03 00:17:14 +11:00
Callum Alpass 13675858e8 Header names the open thread; commands is a bare label
Breadcrumb with the list's status word, the connection note only when not live, and ctrl+k commands with no button background. Tests find the new button wording and the resize bar.
2026-11-02 23:58:19 +11:00
Callum Alpass 2653209b14 Details, palette and settings in the same treatment
Panels without dividers or rounded borders: bold titles, muted bodies, the selected row's accent bar over the full width. The in-place details panel now takes its column's height instead of spilling over the composer.
2026-11-02 23:58:19 +11:00
Callum Alpass 0d59ec0fd3 Thread list on a panel with a status gutter
Title over project, the status or time on the right, a 2-column gutter (spinner, ◆, ✕, ●), the accent bar on the selected row, faint bold section headings with a blank row above, and the filter as an element row with a bar.
2026-11-02 23:58:19 +11:00
Callum Alpass 9293be206c Shared bar edge, invisible resize handle, quieter hint bar
edges.ts carries opencode's border chars (BAR/NO_BORDER). The resize handle is a bar in the background colour at rest and accent under the pointer. Hint keys sit in text over faint labels, and hints that don't fit drop whole from the end.
2026-11-02 23:58:19 +11:00
Callum Alpass e22885d802 Neutral grey palette with one accent, after opencode's 2026-11-02 23:36:10 +11:00
Callum Alpass e857146c9a Text fields keep ctrl+u and ctrl+d for editing 2026-11-02 23:26:01 +11:00
Callum Alpass 49fc25f7a2 Light palette, chosen from the terminal's background or the Colours setting 2026-11-02 23:21:55 +11:00
Callum Alpass 3ef67c5b50 Fetch command output the server left out, for the open row and Copy output 2026-11-02 23:19:54 +11:00
Callum Alpass 81a1ee942c Remember the thread list's dragged width across runs
Kept in layout.json next to the config, as the web keeps its sidebar
width in browser storage. Tests now write to a scratch config folder.
2026-11-02 23:15:33 +11:00
Callum Alpass 320dbf492d Keep the open thread on screen while reconnecting
The session resubscribes threads itself after a reconnect; App no
longer drops the subscription, so the thread doesn't blank to loading.
2026-11-02 23:13:51 +11:00
Callum Alpass 2c5eedc869 Keep retrying the connection and say why; never lose a message that didn't send
As the web's connection supervisor and composer:
- The first connection retries too, so tui3 opens without a server and
  connects when it's up. One-off commands still fail fast.
- The header says why it couldn't connect and when it retries; r, a
  click on it, or the palette retries now.
- Enter while disconnected keeps the message and says so.
- A failed send, or a new thread that doesn't start, puts the message,
  its attachments and its mentions back in the composer.
- Opening a PR in the browser says why it failed and copies the link.
- Error notices stay 8s instead of 4s.
2026-11-02 23:13:06 +11:00
Callum Alpass 275a2bcde1 PR view and find bar keys come from their hooks; drop their dead key handlers
w and u in the PR view now act on the PR it shows, not the first linked one.
2026-11-02 23:06:10 +11:00
Callum Alpass 346212ba5f Use the shared truncate and firstLine in App, Palette and useDetails 2026-11-02 23:04:44 +11:00
Callum Alpass f2ae9ae080 Lint App and the palette files too; rename useResetCredit, which isn't a hook 2026-11-02 23:03:59 +11:00
Callum Alpass 273feb4294 Merge tidy: shared text helpers, hook readability pass, Biome lint 2026-11-02 23:03:07 +11:00
Callum Alpass aac8ee398a Move the composer's / $ @ # menu and its mentions into useComposerMenu 2026-11-02 23:01:21 +11:00
Callum Alpass fc259926c9 Move the details panel out of App into useDetails
The hook owns the git, servers and automations feeds, the panel's
selection and what its rows do, and returns its keys and palette
commands.
2026-11-02 22:58:46 +11:00
Callum Alpass 2b06f3ed43 Move the question flow out of App into useQuestion 2026-11-02 22:55:45 +11:00
Callum Alpass c7364a1e39 Wait for a stable frame in app tests instead of a fixed sleep
Under the full suite the fixed 20ms wasn't enough for React to re-render.
2026-11-02 22:54:21 +11:00
Callum Alpass 1ee6979e83 Move the draft, model picker and thread menu out of App into hooks
Each hook owns its state and returns the bindings for its keys, so App
only orders them.
2026-11-02 22:48:41 +11:00
Callum Alpass 8a0475ed63 One keymap for keys, hints, clickable hints and palette shortcuts
Each binding names its keys, its hint and its palette command once. The app
builds the bindings for the current state in hint order; the first that
takes a key runs it, the hint bar lists them and a click runs the same
action, and the palette reads its shortcuts from them. This replaces the
hand-ordered key handler, the hint strings and the parsing of hint text
back into key events.

The secret, queue and turn hooks return bindings in place of their key()
handlers and command lists.
2026-11-02 22:40:50 +11:00
Callum Alpass 441d9d6ed3 lint: add Biome (lint only) and fix its findings 2026-11-02 22:40:44 +11:00
Callum Alpass d5b6406cae style: readability pass on delegate-written hooks and models 2026-11-02 22:37:00 +11:00
Callum Alpass 87a3a79288 Test the app end to end on OpenTUI's test renderer
A fake session serves fixed state and records calls; tests drive the whole
App by key and mouse and check the screen: modes and hints, the palette and
pickers, approvals, questions, the composer and drafts, and mouse clicks,
menus and resizing.
2026-11-02 22:32:12 +11:00
Callum Alpass a6cfb9a2cd ui: share truncate and firstLine from text.ts 2026-11-02 22:29:31 +11:00
Callum Alpass 12e1e0ba7a Add mouse support across the TUI
Drag to select copies on release. Request cards, the queue, attachments,
the PR view and the key hints get clickable buttons. Prompts, folds,
commands and diff files respond to clicks; prompts, replies, commands and
the PR view get right-click menus. Clicking a pane focuses it, the wheel
scrolls the thread list and palette, rows highlight under the pointer, and
the thread list's border drags to resize.
2026-11-02 22:13:40 +11:00
Callum Alpass fbdfb5c3e0 Merge pull requests: PR view, comments and reviews, merge, links, watch, prepare
# Conflicts:
#	README.md
#	src/ui/App.tsx
2026-11-02 20:52:08 +11:00
Callum Alpass fe9cbb6a9f Merge attachments, usage limits and automation editing
# Conflicts:
#	README.md
#	src/ui/App.tsx
#	test/commands.test.ts
2026-11-02 20:49:42 +11:00
Callum Alpass bc55da3ff0 Add pull requests: # mentions, P view, link/watch, comment, review and checkout
The composer's # suggests pull requests in the thread's repository
(recent list plus the exact number typed, linked ones first) and sends
the web's pull request reference record with the message.

P shows a linked pull request (picker first when several): state,
author, branches, description, checks, reviews, comments, commits and
the review guide. o opens it, r refreshes from the host, c comments
and R reviews in $EDITOR, a runs the host's actions behind a confirm,
w watches, u unlinks. The palette links a pull request by URL or
number and checks one out into a new draft thread.
2026-11-02 20:48:35 +11:00
Callum Alpass 2b31804f8e Add attachments, usage limits and automation editing
Attachments upload like the web composer's (signed URL, then bytes) and ride on the next message or a draft's first message; pending names show above the composer and removal deletes the unsent upload. Settings shows provider limit windows, banked reset credits and the last 30 days' usage summary, with a status-line note near a limit and a confirmed reset-credit command. Automations can be created and edited in $EDITOR from a template parsed back against the web form's rules, and deleted behind a confirm. Asks for the diagnostics:read and providers:manage scopes the new RPCs need.
2026-11-02 20:47:54 +11:00
Callum Alpass 4fe103b657 Merge turns: turn cursor, turn diffs, whole-file context, rewind, live command output
# Conflicts:
#	README.md
#	src/ui/App.tsx
#	src/ui/ThreadView.tsx
2026-11-02 20:45:09 +11:00
Callum Alpass 5efadc0707 Merge search: full-text palette search, find in thread, archive, older settled threads, pinned reorder
# Conflicts:
#	README.md
#	src/ui/App.tsx
2026-11-02 20:43:43 +11:00
Callum Alpass 7eb976f7ac Add turn navigation, checkpoint diffs and confirmed rewind 2026-11-02 20:42:55 +11:00
Callum Alpass 89625dddc5 Add thread search, find navigation, archived and older shelves, and pin reordering 2026-11-02 20:42:33 +11:00