feat(omarchy): a bar widget that answers the one question no cloud plugin can (GDK-116) - #20
Merged
Merged
Conversation
…ugin can (GDK-116)
Omarchy's plugin directory already has widgets for Jira, Linear, Todoist,
ClickUp and Basecamp. Every one of them needs a cloud account, a token, and live
network. Competing on "my assigned tickets" would lose to all of them, and a
standalone gadak workspace has no "me" at all — `init --standalone` clears
AccountID. So the widget shows the two numbers that only a local mirror can
answer offline:
open · stuck 368·201 on the demo snapshot
open is issues outside the done status category; stuck is those whose
status_changed_at is older than seven days. status_changed_at is deliberately
not a stored duration, so the threshold is computed in the query.
The data contract is the part that had to be right. The widget runs
`gadak sql --json` and nothing else — it never opens gadak.db. The mirror is a
disposable cache whose schema is explicitly not a contract; a plugin that opened
it would break on a migration and would read a half-written file mid-sync. The
query lives in one file (gadak/query.sql) that both the QML and the gate use, so
the gate cannot pass on a string the widget does not run. The parser reads stdout
only, because a stale-mirror warning goes to stderr and would otherwise be
parsed as data.
Every failure state is legible, because the state a stranger sees first is "the
plugin is installed and the binary is not":
no gadak PATH miss — tooltip carries the tarball URL and asset names
not synced gadak ran, no mirror yet
sql err non-zero exit, or stdout that is not the expected NDJSON
Never an empty badge. Zero outbound network; one local command.
contrib/omarchy/verify.sh is the gate: manifest shape against the first-party
clock manifest, no sqlite/gadak.db path anywhere in the plugin, no display-name
filter, and the real query run against examples/demo.db asserting NDJSON with
both keys and open > 0. FAIL-first: renaming the query's output columns gives
`missing key 'open' in {'broken_open': 368, ...}` and exit 1. qmllint is absent
here, so that check skips with a printed reason instead of passing silently.
Round premises the delegate corrected against the real sources (branch quattro):
omarchy-plugin-clone only installs first-party ids and cannot install this, so
install.sh copies into ~/.config/omarchy/plugins/<id>/ and enables; and
`issues_full` on the demo snapshot is 534 rows, not 605 — 605 is `items`, which
includes wiki pages.
Lead review changed two things in the QML. `state` was a declared property, but
QQuickItem already owns that name and redeclaring it is a compile error we have
no local qmllint to catch; it is now viewState. And the missing-binary test ran
before the no-mirror test and matched a bare "No such file or directory", so a
plugin folder missing query.sql would have reported "no gadak" — a broken
install disguised as an absent binary.
Not verified: no Omarchy machine has run this. Nothing here has been submitted
to the community directory.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Omarchy's plugin directory already has widgets for Jira, Linear, Todoist, ClickUp and Basecamp. Every one of them needs a cloud account, a token, and live network. Competing on "my assigned tickets" loses to all of them — and a standalone gadak workspace has no "me" at all, since
init --standaloneclearsAccountID. So the widget shows the two numbers only a local mirror can answer offline:openis issues outside thedonestatus category;stuckis those whosestatus_changed_atis older than seven days (a duration is deliberately not a stored column, so the threshold is computed in the query).The data contract is the part that had to be right. The widget runs
gadak sql --jsonand nothing else — it never opensgadak.db. The mirror is a disposable cache whose schema is explicitly not a contract; a plugin that opened it would break on a migration and would read a half-written file mid-sync. The query lives in one file (gadak/query.sql) that both the QML and the gate use, so the gate cannot pass on a string the widget does not run. The parser reads stdout only, because the stale-mirror warning goes to stderr and would otherwise be parsed as data.Every failure state is legible, because the state a stranger sees first is "the plugin is installed and the binary is not":
no gadaknot syncedsql errNever an empty badge. Zero outbound network; one local command.
contrib/omarchy/verify.shis the gate: manifest shape against the first-party clock manifest, nosqlite/gadak.dbpath anywhere in the plugin, no display-name filter, and the real query run againstexamples/demo.dbasserting NDJSON with both keys andopen > 0. FAIL-first: renaming the query's output columns givesmissing key 'open' in {'broken_open': 368, …}, exit 1.qmllintis absent here, so that check skips with a printed reason instead of passing silently.Premises the round corrected against the real sources (branch
quattro):omarchy-plugin-cloneonly installs first-party ids and cannot install this, soinstall.shcopies into~/.config/omarchy/plugins/<id>/and enables; andissues_fullon the demo snapshot is 534 rows, not 605 — 605 isitems, which includes wiki pages.Lead review changed two things in the QML.
statewas a declared property, butQQuickItemalready owns that name and redeclaring it is a compile error we have no localqmllintto catch — it is nowviewState. And the missing-binary test ran before the no-mirror test and matched a bareNo such file or directory, so a plugin folder missingquery.sqlwould have reported "no gadak": a broken install disguised as an absent binary.I also cross-checked
stuckby an independent expression (strftime('%Y-%m-%dT%H:%M:%S','now','-7 day')instead ofjulianday): both give 201, and 167 open issues have a NULLstatus_changed_at, correctly excluded rather than counted as stuck.Not verified: no Omarchy machine has run this, and nothing has been submitted to the community directory.
🤖 Generated with Claude Code