feat(dev): lab ⋯ menu — repo link + auto-close #100
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/99"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rescued from the abandoned AFK run for this issue: the run implemented the feature and its tests but died before committing or opening a PR. Its staged work was committed as-is to
afk/99and verified locally before this PR.What
forgejoInfo.RepoURL()returns""for non-Forgejo projects, so the row renders only inside{{if .Forgejo}}; oneforgejoFor()lookup per poll now feeds both the AFK gate and the link.closeMenus()only ever removesopenand skips the just-clicked summary's own menu, so it never fights the native<details>toggle or the in-place morph (which preservesopenacross a poll) — accordion behavior for free.Verification
go build ./... && go vet ./... && go test ./...— pass (full suite uncached, 42.9s); new testsTestForgejoInfoRepoURL,TestSnapshot_repoURLForForgejoOnly,TestLivePartial_repositoryLink.Closes #99
Add a Repository ↗ row (Forgejo projects only) to the per-project ⋯ menu, linking to the repo home on git.cloonar.com in a new tab. forgejoInfo.RepoURL() reuses forgejoHost as the single host source and returns "" for non-Forgejo projects, so the row renders only inside the {{if .Forgejo}} block; one forgejoFor() lookup per poll now feeds both the AFK gate and the link. Auto-close the ⋯ menu (native <details>) on an outside click, a click of any item inside, or Escape. closeMenus() only ever removes `open` and skips the just-clicked summary's own menu, so it never fights the native toggle or the in-place morph (which preserves `open` across a poll): opening stays native, closing is ours, and accordion behavior comes for free.land-pr validation — verdict: PASS (rescued from the abandoned AFK run for #99).
Signal relied on: the repo's pre-commit gate is eval-only (
nix-instantiate) and structurally can't validate a Go/HTML change, and it's currently red on an unrelateddocker-28.5.2"marked insecure" error that also fails cleanmain— so it can't vouch here. Ran the project's own checks instead:go build ./... && go vet ./... && go test ./...— clean (full suite uncached, 42.9s); the 3 new tests run + passcloseMenus/listeners (outside-click, item-click, Escape close; summary-click keeps its own menu; poll-morph preserves open/closed state)feat(dev):scope, AFK contractCloses #99presentsecrets.yaml/system.stateVersion/ wildcard-import violationsBlockers: none for this change. Caveat: won't deploy to
fwuntil the separatedocker-28.5.2blocker is fixed — that's pre-existing onmain, so merging this regresses nothing.Validation: PASS ✅
Verification signal. The commit used
--no-verify, so the eval-only pre-commit gate did not vouch — and being eval-only (nix-instantiate) it wouldn't cover a Go/HTML change regardless. The diff touches only.go/.html(no.nix, no derivationsrc/hash), so the gate's unrelateddocker-28.5.2"marked insecure" redness is not caused by this PR. I ran the project's own checks against the PR tree (origin/afk/99):go build ./...— OKgo vet ./...— OKgo test ./...—ok lab 42.7s(full suite, uncached)TestForgejoInfoRepoURL,TestSnapshot_repoURLForForgejoOnly,TestLivePartial_repositoryLinkDiff review vs #99 — matches the issue point-for-point:
.menu-sepdivider, opens the repo home in a new tab (target="_blank" rel="noopener"), renders regardless of login state (sits directly in{{if .Forgejo}}, not under a login gate); non-Forgejo cards keep only the disabled line.<summary>toggle is left to own its own menu (accordion for free);closeMenusonly ever removesopen, so it can't fight the poll-morph's deliberateopen-preservation.Inline JS (no committed harness, ADR-0004).
closeMenustraced statically; confirmed the onlydata-confirmarmed action ("Stop all") sits incard-actions, outside<details class="menu">, so auto-close-on-item-click cannot interrupt a confirm step. jsdom isn't available outside the dev-shell, so this is a static + render-test verification (TestLivePartial_repositoryLinkpins the rendered anchor/divider) rather than a live DOM run.Conventions. Conventional Commits title (
feat(dev):);Closes #99present (AFK contract OK); nosecrets.yaml/stateVersion/ module-import changes.FYI (non-blocking). The eval-only pre-commit gate is currently red fleet-wide on
docker-28.5.2"marked insecure" — a separate channel-state issue affecting cleanmaintoo, not introduced by this PR.