Repository navigation
Add watch paths so integrations refresh on file changes - #18
Merged
Merged
Conversation
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 a per-integration
watchoption. devdash re-runs a watched integration soon after anything under its watched files or directories changes, so a section such as prompt-tutor's updates within about half a second instead of on the next interval. A watched integration without its ownintervalstops polling on the global interval.🛠️ Type of Change
🔍 Changes Made
watch = ["~/.local/share/prompt-tutor", "~/.config/prompt-tutor"]: a list of paths, validated strictly, with~and environment variables expanded. Directories are watched recursively, and a missing path is watched until it is created.watchand nointerval, the integration runs at start, on changes, on its keys, and onr. An explicitintervalstill applies alongside watching.fetched 3s ago · watchingfor a watched integration without an interval.--oncedoes not watch.config.example.toml, and the CHANGELOG.🧪 How to Test
git checkout feat/integration-watch && uv syncuv run pytest -q && uv run ruff check .watch = ["/some/dir"]to an integration that lists that directory, then rundevdash. Create a file in the directory: the section shows it within about half a second, and its heading sayswatching.✅ Review and verification
watchcombined with an explicitintervalturned watching off.uv run pytest -q: 115 passed;uv run ruff check .: clean.elifversion and passes now.gh: create and delete events reached the screen in about 0.5 s, the heading saidwatching, andqexited.