Repository navigation
Add custom integrations: user-defined dashboard sections - #6
Merged
Merged
Conversation
Each [[integrations]] table runs a command and shows its output in a chosen slot (top, after-usage, after-my-prs, bottom). Integrations run on their own threads and schedules, with a timeout that kills the whole process group, bounded output capture, and last-good output kept under errors. Quitting or closing the pane kills running integration commands. Closes #5
Owner
Author
|
@coderabbitai review |
- Replace leftover control characters in command output and drop links whose target holds one; show stderr-derived errors as plain text. - Stop running integration commands on every exit path, --once included, and on SIGHUP/SIGTERM; kill a command when capture fails unexpectedly. - Bound interval and timeout to a day; publish rows, time, and error as one tuple so a frame never mixes two runs; reject names with a trailing newline.
shayan-ys
marked this pull request as ready for review
October 9, 2026 04:28
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 adds custom integrations: users can declare any number of their own dashboard sections next to USAGE, MY PRS, and REVIEW REQUESTED. Each section is a command whose output devdash shows, in a slot the user picks, so weather, service health, or a tool such as prompt-tutor can live in the same pane without devdash knowing about them.
Related Issue: Closes #5
🛠️ Type of Change
🔍 Changes Made
COLUMNSand the row budget inLINES. Colours (SGR) and hyperlinks (OSC 8) are kept; cursor movement, screen clears, and other escape sequences are dropped; output pastmax_rowsends in… N more rows.[[integrations]]tables withname,title,command,position,interval,timeout,max_rows,enabled,env, validated like the rest of the config (unknown keys, wrong types, duplicate names, and bad positions stop devdash).--no-integration NAME(repeatable) and--no-integrationsmirror--no-usage/--no-review.top,after-usage,after-my-prs, andbottomslots; integrations sharing a slot keep file order. The built-in sections were split intorender_mine/render_reviewsoDashboardassembles a list of sections separated by rules; the default layout is unchanged (README screenshot regenerates byte-identical apart from the clock)./dev/nulland in its own session. A timeout kills the whole process group, and so does an unexpected capture error.intervalandtimeoutare capped at one day. Output is read incrementally withselectors: at most 64 KiB of stdout (a command that prints more is stopped there) and the last 4 KiB of stderr, so a noisy command cannot grow devdash's memory. Leftover control characters are replaced with�, links whose target holds a control character are dropped, and the stderr-derived error line is plain text, so a command cannot clear or move the dashboard. A failure shows⚠with the reason and keeps the last good output under it; rows, time, and error are published as one tuple, so a frame never mixes two runs. Quitting withq, Ctrl-C, SIGHUP (closing the pane), or SIGTERM kills running integration commands, in live mode and--oncealike.rreruns every integration immediately; a pane resize reruns them at the new width;--onceruns them in parallel.config.example.toml, CHANGELOG.🧪 How to Test
git checkout feat/custom-integrations~/.config/devdash/config.toml:uv run devdash --once: CLOCK is first, SLOW shows⚠ timed out after 2s, and the frame is not delayed beyond the timeout.uv run devdash, pressr(sections rerun) andqwhileslowis running:pgrep -f "sleep 30"finds nothing afterwards.uv run devdash --once --no-integration slowhides SLOW.✅ Review and verification
PATHfallback (e0b4ff2).uv run ruff check .— clean;uv run pytest— 82 passed; CI green on macOS and Ubuntu, Python 3.12–3.14. New tests cover config rejection (including names with a trailing newline and out-of-range interval/timeout), slot order, colour/link retention, hostile control and link sequences, plain-text error lines, last-good output under errors, timeout killing child processes, an unexpected capture error still killing the command, stdout flood stopped at the cap, stderr tail retention, andstop()killing a running command and its children.devdash --onceagainst a real account with a hanging, a failing, an endless (yes), and a real (prompt-tutor --once) integration: each rendered as described above; the hanging one did not delay the frame and left no processes.loading…then output,rrefreshes,qexits 0 with the terminal restored.--oncewith SIGTERM, SIGHUP, and SIGINT, and live mode withqand SIGHUP, each exit 0 and leave 0 processes.--onceand early startup skipped command cleanup; unbounded interval/timeout could crash a polling thread, and an unexpected capture error could orphan a command; a frame could mix two runs' rows, time, and error; a trailing newline passed the name rule; process tests treated zombies as alive and had tight startup timing.