Repository navigation
Add integration keybindings, focus, and fetch countdowns - #17
Merged
Merged
Conversation
prompt-tutor --once no longer prints the key row (shayan-ys/prompt-tutor#17).
Integrations declare keys = { key = "action" }; a press re-runs the command
with DEVDASH_ACTION and a per-process DEVDASH_STATE_FILE. Tab cycles focus
between keyed integrations. [keys] remaps or disables r/q/tab, now
case-sensitive. The footer lists key hints only; section headings count down
to their next fetch. Global refreshes run in the background so input stays
responsive.
Refs #7, map #8.
Each section lists its own keys: an integration's bindings under its output, refresh under the last PR section, and quit plus focus at the bottom. REVIEW REQUESTED shows the same fetch status as MY PRS. Fresh usage reports replace the cached one again (carry_over argument order).
Owner
Author
|
@coderabbitai review |
…scapes - r during a running refresh polls the refresh thread, so the follow-up starts when it finishes instead of at the next interval. - ESC sequences with intermediate bytes (ESC ( B, ESC # 8) are dropped whole instead of leaking their final byte as a key. - USAGE counts down to the global refresh, which is when it is fetched.
Owner
Author
|
@coderabbitai review |
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
This PR lets integrations bind keys and lets users remap or turn off the built-in keys. A key press re-runs the integration with
DEVDASH_ACTION, and each keyed integration gets a privateDEVDASH_STATE_FILEfor the run. Tab moves focus between keyed integrations. Section headings count down to their next fetch, and each section lists its own keys.Related Issue: Closes #7
🛠️ Type of Change
🔍 Changes Made
[keys]table for built-ins (refresh,quit,focus; an empty string turns one off) and a per-integrationkeys = { j = "newer" }table, validated strictly. Collisions with built-ins are rejected, including for disabled integrations.0700temp directory with one0600state file per keyed integration and deletes it on exit.▸marks the focused heading; Tab cycles in screen order.r refreshunder the last PR section, andq quit(plustab focuswhen two or more integrations are focusable) at the bottom. No clock orevery Ns.fetched Xs ago · next fetch Nsorfetching…; REVIEW REQUESTED shares the PR fetch status.rduring a refresh schedules one follow-up.config.example.toml,GLOSSARY.md, CHANGELOG; the stale prompt-tutor Watcher-keys sentence is removed.Built-in keys are now case-sensitive:
RandQno longer refresh or quit.🧪 How to Test
git checkout feat/integration-keys && uv syncuv run pytest -q && uv run ruff check .keys = { j = "newer", k = "older" }and rundevdash. Its bindings appear under its section, a key press redraws that section at once, andq quitis the last row.feat/devdash-keys(shayan-ys/prompt-tutor), which merges first.✅ Review and verification
rduring a running refresh now starts the follow-up as soon as that refresh ends (PTY smoke with a 3 sgh: second call at +3.04 s, no further keys); escape sequences with intermediate bytes (ESC ( B,ESC # 8) are dropped whole; USAGE counts down to the global refresh, which is when it is actually fetched; fresh usage replaces the cached report again (carry_overargument order); REVIEW REQUESTED shows the PR fetch status.uv run pytest -q: 107 passed;uv run ruff check .: clean; CI green on all six matrix jobs. PTY smoke with the real prompt-tutor--onceand a stubgh: per-section hints render (r refreshunder REVIEW REQUESTED, bindings under PROMPT TUTOR,q quitlast),kmoves the selection, keys respond in about 0.03 s during a slowghrefresh, andqexits within 0.05 s.