Skip to content

fix(board): show configured repos — fold default into picker + read config live#11

Merged
mabry1985 merged 2 commits into
mainfrom
fix/picker-includes-default-repo
Jun 26, 2026
Merged

fix(board): show configured repos — fold default into picker + read config live#11
mabry1985 merged 2 commits into
mainfrom
fix/picker-includes-default-repo

Conversation

@mabry1985

@mabry1985 mabry1985 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Two fixes so the board reflects your configured repos correctly.

1. A set default_repo is now selectable (empty-picker bug)

A common config sets default_repo and leaves repos empty: github: { default_repo: owner/name, repos: [] }. The picker is built from repos only, then select.value = default_repo is a no-op with no matching <option> — so the board showed "nothing to select" despite a repo being configured. /config now folds the resolved default into repos (first, deduped), fixing the board and the new-issue form.

2. The board reads config live (no restart)

build_data_router accepts a config getter (callable) as well as a dict. register() passes registry.live_config when the host offers it, so /config reads the current repos/default_repo per request — a config save (which hot-reloads the graph but can't re-mount this router) shows immediately, no restart. Plain dict (tests / older host) stays a snapshot. Pairs with a protoAgent host change adding PluginRegistry.live_config().

Tests

default set + repos empty → default selectable; no dup when already present; live getter reflected per request. ruff clean; 84 passed.

…ectable

A common config sets `default_repo` but leaves `repos` empty. The board/new-issue
pickers are built from `repos` only, so the <select> had zero options — the board
showed "nothing to select" even though a repo WAS configured (the JS set
sel.value = default_repo, but with no matching <option> that's a no-op).

`/config` now returns the resolved default as a selectable option (first, deduped),
so both views populate correctly whether you set `repos`, `default_repo`, or both.
@protoquinn

protoquinn Bot commented Jun 26, 2026

Copy link
Copy Markdown

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #11 | fix(board): fold default_repo into the picker so a set default is selectable

VERDICT: WARN (CI pending — re-evaluate on terminal green)


CI Status

  • test: in_progress

Diff Review

  • api.py: /config now folds the resolved default_repo into repos (prepended, deduped) so the picker always has a matching <option>. Clean fix — no view JS change needed, the existing sel.value = default_repo path just works.
  • tests/test_board_view.py: Two new tests — empty-repos-with-default, and default-already-in-repos. Assertions are precise and cover the dedup + order-preservation edge cases.

Observations

  • No unresolved CodeRabbit threads.
  • No security, data-loss, or correctness concerns on inspection.
  • LOW: CI (test) is still in progress; formal PASS/FAIL deferred until checks settle.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 26, 2026

Copy link
Copy Markdown

Submitted COMMENT review on #11.

build_data_router now accepts a config GETTER (callable) as well as a dict. register()
passes registry.live_config when the host offers it, so the board's /config reads the
current repos/default_repo per request — a config save (which hot-reloads the graph but
can't re-mount this router) is reflected immediately, no server restart. A plain dict
(tests, older host) stays a fixed snapshot.

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI terminal-green, no blockers on prior review — auto-approving on green (#748).

@mabry1985 mabry1985 changed the title fix(board): fold default_repo into the picker so a set default is selectable fix(board): show configured repos — fold default into picker + read config live Jun 26, 2026

@protoquinn protoquinn Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Audit — PR #11 | fix(board): fold default_repo into the picker so a set default is selectable

VERDICT: WARN (CI still running; code review clean)


CI Status

  • test: in_progress

Diff Review

  • api.py: /config now folds resolved default_repo into returned repos list (deduped, first position) — fixes empty picker when default_repo is set but repos is empty
  • api.py + __init__.py: build_data_router now accepts a callable getter for live config reads, falling back to static dict for older hosts — clean backward compat
  • Three new tests cover: default+solo, default already present (no dup), and live-getter path

Observations

  • LOW: clawpatch structural review unavailable for this repo (checkout cache resolution failed); diff-based review only
  • The fix is targeted, tests are well-chosen, and the live-config path preserves backward compat. Once CI goes green, this is an APPROVE.

— Quinn, QA Engineer

@protoquinn

protoquinn Bot commented Jun 26, 2026

Copy link
Copy Markdown

Submitted COMMENT review on protoLabsAI/github-plugin#11.

@mabry1985 mabry1985 merged commit 807b178 into main Jun 26, 2026
1 check passed
@mabry1985 mabry1985 deleted the fix/picker-includes-default-repo branch June 26, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant