Repository navigation
Open saved GitHub rows from dashboard commands - #13
Conversation
fdussert
left a comment
There was a problem hiding this comment.
Thanks — this is solid. Loopback-only, a strict zod payload, the URL taken from the last snapshot and never from the widget, the https/host/credentials/path checks, /usr/bin/open with an argument list, and a test that nothing is written back to GitHub: that's exactly how I'd want it done. A few small things when you take it out of draft:
-
Other loopback-only commands answer a remote caller with
{ ok: false, error: tr(undefined, 'provider.localOnly') }. Couldopendo the same, so the widget can say why nothing happened? -
.strict()makes this the only GitHub payload that rejects unknown keys, and the host already stampsinstanceIdinto every command. If that stamp ever gains a field,openbreaks whilemarkReadkeeps working. Consider dropping.strict(): the handler only readskindandidanyway. -
Nit:
OPEN_PROGRAMalready exists inproviders/spotify.tsandhelper/routes.ts. Reusing it (or a shared opener) would keep a single place that says whichopenwe run. Also,url.portrejects GitHub Enterprise on a non-standard port — if that's intended, it's worth a comment. -
The CHANGELOG line sits as a loose bullet above
### Changed; please move it under### Added. #10–#12 add theirs at the same spot, so expect a small rebase.
On ordering: fremkit-sietch #1/#2 depend on this command, so this has to ship in a Fremkit release before those widget versions are published.
|
Thanks, Florian — all three points are addressed (no |
eef79eb to
114b44e
Compare
|
Thanks Florian, the changelog lead reads well. LGTM — good to merge once it's out of draft. |
Accept only loopback requests for IDs present in the connection's latest snapshot and validate the resulting GitHub URL before opening it, without marking notifications read. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Match the project changelog style requested in review. Co-Authored-By: Claude <noreply@anthropic.com>
114b44e to
92b8640
Compare
fdussert
left a comment
There was a problem hiding this comment.
Thanks Florian — out of draft, rebased, changelog lead in place. Merging (squash).
What this changes
GitHub widget rows currently have no host command for opening their saved destination. This adds a loopback-only command that accepts a row ID from the latest snapshot, validates its HTTPS GitHub repository URL, and opens it without changing notification read state.
Related fork issue: FlorianBruniaux#21
How to see it
Touch a workflow, notification or review row in a widget that sends the
opencommand. The saved GitHub page should open in the Mac browser. Tests cover valid rows, unknown IDs, foreign hosts and remote callers.Checks
pnpm typecheckandpnpm buildpass on this branch.pnpm --filter server exec vitest run --testTimeout 15000 --hookTimeout 20000; the 385 UI tests pass with the default timeout.pnpm testtimed out in unchanged Dock and favicon tests at their 5-second limit on this Mac. The focused GitHub tests pass (44/44).pnpm build; no UI source changed.