connect: full-width composer that wraps, readline shortcuts, and a live model list#79
Merged
Conversation
…ve model list The new-session pane had grown several papercuts that made it read as a prototype rather than the place you start work: - the heading asked "What would you like to do?"; it now asks what we are shipping today - the prompt input sat one column in from the edge, so its rules did not line up with the header's or the nav's - a long prompt truncated and ran off the right edge instead of wrapping - neither text input honored the readline bindings a terminal actually delivers (option+arrows, ctrl+a/e/w/u/k), so a typo mid-prompt meant holding down the left arrow - the model picker's list was hardcoded and had gone stale, missing Opus 5 - the session nav ran its cells together as one strip of text, and its new-session button truncated to "+ Ne…" once the bar got crowded The model list now comes from GET /v1/models, so the picker tracks the server's registry instead of drifting from it every time we enable a model. An older server without that route falls back to the built-in list. The nav gains vertical rules between cells and pins the new-session button at its full label width, dropping session cells (which the "› N more" tail already accounts for) when the terminal is too narrow for both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Seven papercuts in the multi-session UI's new-session pane and nav bar.
paddingLeft={1}that inset the composer's rules one column from the header's and the nav's. Removed; the rows inside carry their own indents.wrap="wrap"against an explicit width, so it flows onto the next row and the box grows downward into the spacer above.GET /v1/models, so it tracks the server registry instead of drifting each time we enable a model. An older server without that route falls back to a built-in list.src/lib/editing.ts: option/ctrl+arrows and meta+b/f hop a word, ctrl+a/e reach the line edges, option+backspace and ctrl+w kill a word, ctrl+u/k kill to the line edges. cmd+arrows never reach the process (macOS terminals keep the command modifier for themselves), so ctrl+a/e stand in for it.Depends on a backend change
GET /v1/modelsdoes not exist yet./modelsexists but is a dashboard-cookie route the CLI's bearer token cannot call, so this PR needs the companionv1_router.pychange (reusing the models router'ssupported_models()) before the picker reads live data. Until then the fallback list applies; I verified it matches the server registry exactly, Opus 5 and the default flag included.Test plan
vitest run— 298 pass, including new coverage forcomposerModelOptions(server order, default naming, empty fallback) and all ofapplyEditShortcuttsc --noEmitcleancapture-pane -e)