Skip to content

Instantly share code, notes, and snippets.

@castrojo
Created August 14, 2026 01:32
Show Gist options
  • Select an option

  • Save castrojo/b35ed3574e99ea26886d090bed96d63c to your computer and use it in GitHub Desktop.

Select an option

Save castrojo/b35ed3574e99ea26886d090bed96d63c to your computer and use it in GitHub Desktop.
Handoff: FOCUS MODE redesign of the projectbluefin/review maintainer dashboard

Handoff — FOCUS MODE redesign of the Bluefin review dashboard

Repo: projectbluefin/review (local: /var/home/jorge/src/review, branch main) Status: planning only. No repository files were modified. Plan written, not approved. Plan: ~/.copilot/session-state/48296b9d-f1a2-4d36-873e-13b2ad0767b4/plan.md — read this first, it is the spec. Scratch evidence: …/48296b9d-f1a2-4d36-873e-13b2ad0767b4/files/ — hive_api.go, hive_contrib.go, contribute_sse.go, contribute_triage.go fetched at the pinned Hive commit. Todos: 12 rows in the session SQL todos + todo_deps, all pending. Query the ready set before starting.

What the user asked for

Turn just review-queue (image/tui/bluefin_review_tui.py, 2820 lines) from a static reader into a real-time meter: a Hive-ordered FOCUS MODE panel, reviews that run detached and observable in a side pane, a live work queue, Renovate collapsed into expandable groups, no gh lag, and notifications that describe the work instead of printing argv.

Decisions already locked by the user (do not re-ask):

Question Answer
Priority source Local scorer — superseded, see below
Concurrent reviews Pool of 3 — superseded, see below
Layout [F] toggle, not a replacement
Renovate Expando widget, grouped
Grouping key Dependency subject, repo as sub-line
Decision tree Inline in the detail pane
Latency Bulk prefetch, one gh pr list per repo
Escalations agent blocked/failed/awaiting-stable · review finished unread · review requested · changes-requested-then-pushed · unanswered mention · approved-gone-red · merge-ready
Ship as one change No — phased

The finding that reframed the plan

The user's initial "local scorer" choice was made before we knew the hub's API. It does expose one. At pinned commit a66927df7b5dff14423cdd2a31826b79a2c1ddc9 of kubestellar/hive, everything under /api/contribute/* is public and read-only (isPublicPath in server.go exempts the prefix) — unlike /api/v1/*, which validates a GitHub token per call. Endpoints, payloads, and the doc gap are tabulated in plan.md; don't re-derive them.

docs/skills/hive-runtime.md documents only the WebSocket relay and says nothing about this HTTP read API. That gap is why the dashboard reinvented ordering locally. The user was emphatic: "docs and dashboard need to be updated, this is a huge feature of the tool." Docs ship with each phase, not after.

Where the session stopped

The user rejected the plan with:

"send a research agent to check our hive, etc. I picked three to batch but if we know the hive endpoint and source let's check for batching opportunities, for example if it's 4 high priority issues that can be batched, optimized, that kind of thing"

A research agent was dispatched and interrupted before returning. Re-dispatch it. Its brief, verbatim in intent:

Answer, with pinned-permalink citations and real JSON:

  1. Does the hub expose any grouping/relatedness/batching signal? Read ReadyQueue() and selectTask in contribute_ws.go, OpportunisticWork() in contribute_opportunistic.go, and the triage grouping. Same-kind, same-repo, same-label, epic/parent, duplicate, blocked-by, any dependency edge? "There is none" is a valid and important answer — report it plainly rather than inventing one.
  2. The ready-queue ranking rule — quote the actual sort and the admission logic (cooldown, quarantine, hold, staleness, label weight, recency heat).
  3. Tier concurrency limits — Config.Hub.TierLimits (max_per_hour, max_per_day, max_concurrent) across newcomer→advisor. Defaults from v2/pkg/config/, plus live values. This is what should set the review pool size instead of the arbitrary 3.
  4. Issue→PR link reliability — contribute_prlink.go. Our queue is PRs, the hub ranks issues; the link is the join. How is it made, and how often does it hold?
  5. Exact JSON field names for SSE activity events (ActivityEntry) and /api/contribute/metrics.
  6. Live probe of https://hosted-projectbluefin-knuckle-gjvq.hive.kubestellar.io (public; try unauthenticated first, Authorization: Bearer <gh auth token> only on 401). curl --fail --show-error --silent --max-time 20. Report ready-item count, top ~15, how many share a repo or label — i.e. real observable batching opportunity in our hive today — actual tier limits, and how many triage issues carry a PR link.
  7. Recommendation — what batching affordances to build, what the pool size should be and why, and whether a gap is worth filing upstream.

Constraints for that agent: read-only, no hub PUT/POST, no GitHub mutation, no token printed, no repo files touched, pinned permalinks only.

Then fold the answers into plan.md — replacing the arbitrary "pool of 3" and the "batching = whatever the maintainer selected" model with evidence — and call exit_plan_mode again.

Live hazard: a second agent is editing the same file

git status showed uncommitted work appear mid-session:

 M image/tui/bluefin_review_tui.py   (+140)
 M tests/dashboard_pilot.py          (+194)

Another agent is adding vim navigation and converting #details/#context to ScrollableContainer. It owns BINDINGS, CSS, compose(), KEYS_READING/KEYS_ACTING — the exact Phase 4 surface — and already moved ghost_build from g to B to free g. Phase 4 must not start until that is committed. Phases 1–3 are new modules and do not collide. The coordination message to send them is in plan.md; it needs F and space reserved.

Repository rules that will bite you

From AGENTS.md — these are enforced, not advisory:

  • No grandfathering. The words grandfathered, legacy exception, pre-existing, for now, temporarily are rejected. Fix it or delete it.
  • A gap is filed, not documented. Open an issue and cite the number; never write a paragraph explaining a known defect.
  • Hive is the sole authority for task assignment. Adopting the hub's order is fine; a PUT /api/contribute/queue/order from a maintainer dashboard is not. Stay read-only against the hub.
  • Every GitHub mutation goes through mutate_all() with exact commands and the typed-number gate. Nothing in this plan adds a mutation path.
  • Presence is proven by pressing the key in tests/dashboard_pilot.py. Static greps in tests/dashboard-contract.sh prove absence only.
  • Never hand-roll a utility the base ships. Verify absence by executing it at the pinned digest.
  • Durable learning goes to the matching docs/skills/* file; regenerate docs/skills/index.json with bash scripts/check-skill-frontmatter.sh --write, never by hand. No changelogs, session notes, or plan documents committed.

Validation commands are listed in AGENTS.md and repeated per-phase in plan.md.

Suggested skills

Invoke in this order:

  1. using-superpowers — the meta-rule; it gates everything below.
  2. brainstorming — this session was mid-brainstorm and never reached the design-approval gate. Its terminal state is writing-plans, nothing else.
  3. writing-plans — once the research lands and the design is approved.
  4. review-dashboard (repo skill, docs/skills/review-dashboard.md) — mandatory before touching bluefin_review_tui.py. Contains the Textual traps that were found by running, not remembering: upstream escape() misses uppercase tags, [link=…] needs a quoted URL, never query the DOM from a thread worker.
  5. hive-runtime (repo skill) — read it, then fix it; the HTTP read API is missing from it.
  6. upstream-hive (repo skill) — if the research finds a batching gap worth filing.
  7. ponytail and caveman — the user had both loaded and expects them: lazy/YAGNI implementation, terse prose.
  8. end-session — the factory exit checklist, before any handoff or PR.

Notes for the next session

  • The hub caps its ready queue at 150; a deeper backlog has no hub rank and correctly falls to the local band.
  • Pilot tests must stub the SSE stream so an offline test never opens a socket — add a fake next to the existing hive_get stub.
  • dependency_subject() and mechanical_reason() already exist and are load-bearing. Grouping is display-only; mechanical_reason() must still prove each stop from live evidence individually.
  • landing.py is the reference pattern for the whole detached-work model: background agent, JSONL status file, polling screen. Copy its discipline — never scrape agent prose for status.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment