Repository navigation
feat: a live home screen, one consistent terminal UI, faster and safer commands - #47
Merged
Merged
Conversation
…r commands The terminal UI, rebuilt as one system: - Bare `kdev` is a live menu: usable at once while the box and quota load, a key per action, the command each item runs shown as you move, a running box counting down, and the next box's quota use previewed. It folds for short terminals. - One-line headers outside the front door; cards, spinners and prompts on one gutter; numbered prompts where a digit picks; `up` drawn as a rail with live clocks and remembered step timings; a time-left bar. - Piped output is data: tab-separated tables, no wrapping, advice on stderr. ASCII-only terminals get ASCII stand-ins instead of crashing. - Usage errors in kdev's voice, with did-you-mean for commands, settings and accelerators. Quota refill time in `account` and the home screen. Speed: `status` 13s -> ~5s (state read without paging the whole listing), `history` 61s -> 18s, ~1s when cached; keep-alive HTTP; parallel reads. Fixes: tokens were re-minted on every call and written into the official CLI's ~/.kaggle/credentials.json; offline commands crashed; a transient error could let `up` overwrite notebook code; duplicate group bindings; stale or shadowed ~/.ssh/config blocks; pam_env dropping the notebook PATH over ssh; `backup` overwriting a good copy with a partial box; 429s not waited out; ssh calls without timeouts; broken pipes exiting 1; tests that reached the network.
The README no longer carries mermaid (PyPI cannot render it). The diagrams and technical detail move to a new /docs/how-it-works/ page, drawn in the site's own style, and to docs/ARCHITECTURE.md for contributors. The site's `kdev up` replay, command reference and everyday-use page match the new terminal UI, and the changelog records it all.
Rich keeps each parsed Style's ANSI codes from the first colour system it rendered for. Under GITHUB_ACTIONS, Typer renders help through a 16-colour console, so the logo test later saw cyan (36) instead of #00b8d4. The test fixture now clears Rich's style caches. The docs' plain-text outputs strip figure-caption markup until none is left, which also clears CodeQL's multi-character sanitisation alert.
This branch was successfully deployed
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.
What and why
The terminal UI felt inconsistent and slow. This rebuilds it as one system, fixes the bugs found along the way, and moves the README's diagrams to the website so the PyPI page renders cleanly.
Terminal UI
kdevis a live home screen (an inline prompt_toolkit app,src/kdev/menu.py): usable immediately while the box and every account's quota load in the background. Every action has a key, arrows/j/k/Enter work, the highlighted item shows the exact command it runs, a running box counts down, and the active account's bar previews the next box's quota use. It folds for short terminals.kdev upprogress drawn as a rail with live clocks and "usually Ns" from earlier runs; a time-left bar instatusand the ready card.accountand the home screen; branded--helpwith examples.Speed (measured on real accounts):
status13.4s → ~5s,history61s → 18s (1s cached), home screen draws at once instead of after ~20s.Fixes: token re-minting that overwrote
~/.kaggle/credentials.json; offline crashes;safety.checktreating any error as "empty notebook"; duplicate group bindings on share; stale/shadowed~/.ssh/configblocks; pam_env dropping the notebook PATH over ssh;backupreplacing a good copy with a partial box; 429 handling; missing ssh timeouts; broken-pipe exit status; tests that reached the network.Docs: README without mermaid (PyPI-friendly); diagrams on a new
/docs/how-it-works/page and indocs/ARCHITECTURE.md. Note: the nav's "How it works" now links to that page instead of/#how.How I checked it
NO_COLOR, ASCII and piped output; colour renders checked on dark and light backgrounds.kdev up --gpu none): up, status, home menu,forward(HTTP 200 through the tunnel),ssh --, logs, reconnect, status as a second account, down → saved. PATH over non-interactive ssh verified on the box.Checklist
uv run pytestanduv run pre-commit run --all-filespass locally## [Unreleased]inCHANGELOG.md