Skip to content

fix(view): wire registry-packages list into debug bar Packages tab#2533

Merged
bpamiri merged 2 commits into
developfrom
fix/bot-2530-debug-panel-packages-tab-does-not-list-registry-pa
May 10, 2026
Merged

fix(view): wire registry-packages list into debug bar Packages tab#2533
bpamiri merged 2 commits into
developfrom
fix/bot-2530-debug-panel-packages-tab-does-not-list-registry-pa

Conversation

@wheels-bot
Copy link
Copy Markdown
Contributor

@wheels-bot wheels-bot Bot commented May 10, 2026

Summary

The debug bar's Packages tab only rendered the installed-packages table — vendor/wheels/events/onrequestend/debug.cfm iterated application.wheels.packageMeta but never called Public.$loadRegistryPackages(), so the list of packages available from wheels-dev/wheels-packages (sentry, hotwire, basecoat, legacy-adapter, i18n, seo-suite) was silently missing. The identical wire-up has worked in /wheels/packages all along (see vendor/wheels/public/views/packagelist.cfm:44); this PR mirrors it inside the debug bar.

The new "Available from registry" sub-section reuses the same data source (and 24h app-scope cache) as the standalone packages page. Each row links package name → homepage when one is published in the registry manifest. Failure modes (registry HTTP error, CLI registry class not on classpath, production mode) are silently inherited from $loadRegistryPackages() itself, so the existing tests in vendor/wheels/tests/specs/packages/LoadRegistryPackagesSpec.cfc cover them.

Related Issue

Closes #2530

Type of Change

  • Bug fix
  • New feature
  • Enhancement to existing feature
  • Documentation update
  • Refactoring

Feature Completeness Checklist

  • Testsvendor/wheels/tests/specs/events/debugPanelPackagesSpec.cfc (failing → passing) plus a FakePublic fixture under vendor/wheels/tests/_assets/packages/. Spec renders debug.cfm via application.wo.$includeAndReturnOutput with a stubbed registry and asserts the package name appears in the output.
  • Framework Docs — left for bot-update-docs.yml follow-up
  • AI Reference Docs — left for bot-update-docs.yml follow-up
  • CLAUDE.md — left for bot-update-docs.yml follow-up
  • CHANGELOG.md — entry under [Unreleased] › Fixed
  • Test runner passeswheels.tests.specs.events 30 pass / 0 fail / 0 error and wheels.tests.specs.packages 69 pass / 0 fail / 0 error against Lucee 7 + SQLite

Test Plan

  • New spec demonstrates the bug: pre-fix → "registry-packages table is not being rendered" failure; post-fix → green.
  • Cross-engine: implementation uses only cfif, cfset, cfloop array=, HTMLEditFormat, IsObject, StructKeyExists, Len, REFindNoCase — all safe across Lucee/Adobe/BoxLang. No closures, struct member functions, or elvis operators in the template body.
  • Spec is hermetic: stubs application.wheels.public with a FakePublic subclass for the duration of the test, restores all touched application/request state in finally. Also clears url.format to bypass the existing cfexit early-out so the template actually renders.

Screenshots / Output

$ curl -s "http://localhost:60007/wheels/core/tests?db=sqlite&format=json&directory=wheels.tests.specs.events" | jq '{pass: .totalPass, fail: .totalFail, err: .totalError}'
{
  "pass": 30,
  "fail": 0,
  "err": 0
}

The debug bar's Packages tab only rendered the installed-packages
table, never calling Public.$loadRegistryPackages() — so the list of
packages available from wheels-dev/wheels-packages was missing. The
identical wire-up has worked in /wheels/packages all along; this just
mirrors it.

Fixes #2530
@wheels-bot
Copy link
Copy Markdown
Contributor Author

wheels-bot Bot commented May 10, 2026

Wheels Bot — Docs updated

Added a doc commit to this PR:

  • web/sites/guides/src/content/docs/v4-0-0-snapshot/digging-deeper/packages.mdx — added two-sentence note after the first-party packages list explaining that the debug bar's Packages tab now shows both installed packages and a live "Available from registry" table (the 24h-cached registry index) in development mode.

No .ai/wheels/ or CLAUDE.md changes were needed — the package-system conventions and anti-patterns are unchanged; only a user-visible UI detail was added.

@bpamiri bpamiri marked this pull request as ready for review May 10, 2026 03:29
@bpamiri bpamiri merged commit 4d48062 into develop May 10, 2026
13 checks passed
@bpamiri bpamiri deleted the fix/bot-2530-debug-panel-packages-tab-does-not-list-registry-pa branch May 10, 2026 03:29
bpamiri added a commit that referenced this pull request May 10, 2026
…2535)

Tonight's pipeline test ([#2530] → [#2533]) demonstrated that
propose-fix produces solid bug-path PRs end-to-end, but the existing
classification taxonomy left a gap: pure docs-request issues fell
through into `other` (no automation) or, if reframed as
`framework-design`, would attempt the TDD-shaped propose-fix prompt
that doesn't fit doc-only work.

This PR adds a fourth classification path:

  triage → docs-request + docs-confidence:high
       → bot-write-docs.yml
       → docs/bot-<issue>-<slug> branch
       → draft PR (TDD gate skips, since the branch prefix says docs)
       → Reviewer A/B run as normal so the human merge has context

## What changed

### New files

- `.claude/commands/write-docs.md` — the prompt. Mirrors propose-fix's
  shape but is doc-paths-only (no specs, no test runs, no `vendor/`,
  `app/`, or `tests/` writes). Uses screenshot-placeholder MDX comments
  for features that benefit from images, since the bot can't run a
  headless browser.
- `.github/workflows/bot-write-docs.yml` — the workflow. Sonnet not
  Opus (doc work is pattern-recognition, not reasoning-heavy); 30-turn
  budget; narrow allowlist; same `wheels-bot[bot]` author check as the
  other Phase 4 auto-fire stages.

### Modified files

- `.claude/commands/triage-issue.md` — adds `docs-request` to the
  classification taxonomy with explicit boundary against `other`
  ("clear deliverable in the issue?"); adds the docs-request branch in
  step 4 with confidence rating + comment template emitting the
  `docs-confidence:high` marker.
- `.github/workflows/bot-tdd-gate.yml` — gains `is_docs` output that
  detects `docs/bot-*` head refs; the verify step now guards on
  `is_bot && !is_docs`. Docs-only PRs by definition have no spec/impl
  pair to validate.
- `.github/workflows/bot-update-docs.yml` — skips `docs/bot-*` head
  refs to avoid the redundant case where update-docs runs on a PR
  whose entire purpose was docs.
- `docs/contributing/wheels-bot.md` — six stages → seven; new "### 4.
  Write Docs" section; Update Docs / Reviewer A / Reviewer B
  renumbered to 5/6/7; markers table gains the three new markers
  (`docs-confidence:high`, `write-docs:<issue>`, `docs-held:<issue>`)
  and adds `docs-request` to the triage-class enumeration.

## Why a separate workflow rather than a mode of bot-update-docs

The two workflows look superficially similar but their inputs are
different shapes — bot-update-docs adds a commit to an *existing* PR
(needs PR number), bot-write-docs creates a *new* PR from an issue
(needs issue number). Combining them would require dual-mode logic
in one workflow with different env, different concurrency keys, and
a non-trivial branch on event_name. Two narrow workflows keep each
one clear about its job.

## Coordinated repo-level change

The `wheels-bot push scope` ruleset (16174270) needs `docs/bot-*/**`
added to the allowed push patterns alongside `bot/**` and `fix/bot-*/**`.
Done out-of-band via the GitHub UI before this PR landed.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bpamiri added a commit that referenced this pull request May 10, 2026
The first end-to-end run of the docs-request path on issue #2536
([#25619794274](https://github.com/wheels-dev/wheels/actions/runs/25619794274))
revealed that bot-write-docs's allowlist scoped git too narrowly:
specific subcommands (status, log, diff, show, grep, add, commit) but
not push. The bot wrote the docs, committed them, then attempted
`gh pr create` — which needs the branch on remote, but the bot couldn't
push it. The workflow's "Push branch" step ran AFTER the bot finished,
pushing too late for the bot's `gh pr create` call.

Result: the docs/bot-2536-* branch landed on origin with full content,
but no PR was opened. The bot caught this in its issue comment and
explained the situation correctly ("the workflow's push step will
publish the branch after this run; once it is on the remote, the
draft PR can be opened from that branch") — high-quality failure
reporting, but the cascade stopped there.

Add `Bash(git push:*)` to the allowlist. The wheels-bot push-scope
ruleset (16174270) restricts WHERE the bot can push to bot/**,
fix/bot-*/**, and docs/bot-*/**, so granting push capability does
not expand the bot's blast radius — it just lets the bot execute
the push the ruleset will permit anyway. Mirrors propose-fix's
`Bash(git:*)` wildcard (which has been working since #2533).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug Panel "Packages" tab does not list registry packages (pipeline test)

1 participant