feat(home): business-only Page Speed home; setup and run queue become admin widgets #17

Merged
KofTwentyTwo merged 1 commits from feature/page-speed-business-home into develop 2026-10-16 15:19:45 +00:00
KofTwentyTwo commented 2026-10-16 14:12:57 +00:00 (Migrated from github.com)

Summary

The Page Speed home is now business-only. The provider Setup card (which read "The host sets googleApiKey in the qbit config (read from an environment variable)") is replaced by a NotConfigured widget: while no Google API key is set it shows "Page speed testing is not set up / Ask an admin to add a Google PageSpeed API key." (no env-var or config-key names), and renders nothing once configured (no platform omit-when-empty hook exists, so the widget is non-card and returns empty HTML). The detailed Setup readout and Recent Runs (run-queue state) are off the home and exposed as WebPerfWidgets.ADMIN, each gated to <base>.admin.hasAccess with DenyBehavior.HIDDEN, for a host to place on its Admin area. Scores, trend, slowest pages, opportunities and field data are unchanged.

Rubric item moved

A1 0 -> 1 on Page Speed (webPerformance)

Audit row fixed

Page Speed A1: "Setup card is a provider-configuration readout ("The host sets googleApiKey in the qbit config (read from an environment variable)") and Recent Runs shows run-queue state on a content app home (A-0)". Top gap 1: "Replace Setup with a business "not configured" empty state ("Ask an admin to add a Google API key") and move run-queue detail to Admin".

Tests

WebPerfP1Test: testHomeIsBusinessOnly (home list has no Setup or Recent Runs; ADMIN list is those two), testNotConfiguredEmptyState (unconfigured shows the business text with no googleApiKey/env-var wording; configured renders nothing), testAdminWidgetsAdminOnly (admins render both; a session without web_performance.admin.hasAccess is denied under enforcement, HIDDEN deny behavior). Help bundle coverage updated. ./mvnw verify passes locally (note: system Maven 3.10 rejects the duplicate liquibase-core dependency already on develop; the wrapper works).

Screenshots

Widget-level preview of the unconfigured state, before (Setup card) and after (empty state), widths 390/768/1024/1440/1920/3200, attached locally: C:\Users\james\AppData\Local\Temp\claude\R--Git-Local-KofTwentyTwo-Praetor\83da0ae2-628c-4edb-9fd7-a93d49e86d27\scratchpad\dashboard-standard\pr-shots\qbit-web-performance-home\ (before-<w>.png, after-<w>.png). Full-page shots happen when kof22 pins the release.

Release

Needed: cut v0.1.0-RC.6 (kof22 main pins 0.1.0-RC.5; latest tag is RC.5). Follow-up in kof22 (Website-Backend, not done here): bump the pin to 0.1.0-RC.6 and add the WebPerfWidgets.ADMIN widgets (config.qualify(...)) to the Admin area's widget list.

🤖 Generated with Claude Code

## Summary The Page Speed home is now business-only. The provider Setup card (which read "The host sets googleApiKey in the qbit config (read from an environment variable)") is replaced by a `NotConfigured` widget: while no Google API key is set it shows "Page speed testing is not set up / Ask an admin to add a Google PageSpeed API key." (no env-var or config-key names), and renders nothing once configured (no platform omit-when-empty hook exists, so the widget is non-card and returns empty HTML). The detailed Setup readout and Recent Runs (run-queue state) are off the home and exposed as `WebPerfWidgets.ADMIN`, each gated to `<base>.admin.hasAccess` with `DenyBehavior.HIDDEN`, for a host to place on its Admin area. Scores, trend, slowest pages, opportunities and field data are unchanged. ## Rubric item moved A1 0 -> 1 on Page Speed (`webPerformance`) ## Audit row fixed Page Speed A1: "Setup card is a provider-configuration readout ("The host sets googleApiKey in the qbit config (read from an environment variable)") and Recent Runs shows run-queue state on a content app home (A-0)". Top gap 1: "Replace Setup with a business "not configured" empty state ("Ask an admin to add a Google API key") and move run-queue detail to Admin". ## Tests `WebPerfP1Test`: `testHomeIsBusinessOnly` (home list has no Setup or Recent Runs; ADMIN list is those two), `testNotConfiguredEmptyState` (unconfigured shows the business text with no `googleApiKey`/env-var wording; configured renders nothing), `testAdminWidgetsAdminOnly` (admins render both; a session without `web_performance.admin.hasAccess` is denied under enforcement, HIDDEN deny behavior). Help bundle coverage updated. `./mvnw verify` passes locally (note: system Maven 3.10 rejects the duplicate liquibase-core dependency already on develop; the wrapper works). ## Screenshots Widget-level preview of the unconfigured state, before (Setup card) and after (empty state), widths 390/768/1024/1440/1920/3200, attached locally: `C:\Users\james\AppData\Local\Temp\claude\R--Git-Local-KofTwentyTwo-Praetor\83da0ae2-628c-4edb-9fd7-a93d49e86d27\scratchpad\dashboard-standard\pr-shots\qbit-web-performance-home\` (`before-<w>.png`, `after-<w>.png`). Full-page shots happen when kof22 pins the release. ## Release Needed: cut `v0.1.0-RC.6` (kof22 `main` pins `0.1.0-RC.5`; latest tag is RC.5). Follow-up in kof22 (Website-Backend, not done here): bump the pin to `0.1.0-RC.6` and add the `WebPerfWidgets.ADMIN` widgets (`config.qualify(...)`) to the Admin area's widget list. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.