Skip to content

feat(root): one stack standard for the ops consoles, Bun catalog and stack check - #5275

Merged
shepherdjerred merged 3 commits into
mainfrom
console-stack-standard
Nov 28, 2026
Merged

shepherdjerred merged 3 commits into
mainfrom
console-stack-standard

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Why

The ten first-party ops consoles (Hub, Delivery, Tracker, Errors, Mail, Flags, Feeds, Go link, Charts, CI cache) share React, Vite, TypeScript, Vitest, Zod and console-ui at the same versions, then diverge below that: React Router beside TanStack Router and hand-rolled routing, REST beside tRPC, raw SQLite beside Prisma, native dialogs beside Base UI. Nothing wrote the standard down, kept versions aligned, or stopped a new console starting from a bare server. This is S0 of the stack plan: write the standard down and start enforcing it. No console is migrated here.

What

  • Bun catalog. Root package.json catalog holds one version of each shared library (nothing upgraded; versions are the ones already resolved in bun.lock). The ten consoles, console-ui and ops-model declare them as "catalog:"; bun.lock changes only in workspace specs, not in resolved packages.
  • Renovate. Renovate's npm manager does not extract a root catalog (verified with a local renovate --dry-run=extract), so a JSONata custom manager in renovate.json reads all entries (35 extracted). The TypeScript <7 rule also matches it. check-floating-deps accepts catalog: and checks the catalog entries themselves; check-renovate-hints ignores non-regex managers.
  • Stack check. bun run check-console-stack (package.json, turbo, verify) reads each console's package.json plus console-ui: required libraries, banned alternatives, catalog: use, Rust-console exceptions, and a per-app allowlist of today's deviations with reasons. A deviation with no entry fails; an entry whose deviation is gone fails, so the list only shrinks.
  • Lint parity. Mail, Flags and Feeds now lint with the React rules (react: true). Mail: 0 findings. Flags: 8, Feeds: 5, all custom-rules/no-use-effect. Fixed with ref callbacks (Feeds window listeners and dialog lifecycle, Flags diff editor), <title> (Flags), and derived state (Feeds dialog reset). One scoped config override remains for Flags' Monaco JSON editor (src/client/monaco/json-editor.tsx), which mirrors controlled text and aria attributes into Monaco's own model.
  • Scaffolder. new-service.ts --kind web --console writes the standard stack: Hono on Bun with /healthz, a tRPC router with an example procedure, a PostgreSQL Prisma schema, and a Vite + React client with TanStack Router, the @trpc/tanstack-react-query provider and console-ui's shell, with catalog: dependencies. The scaffolder now prettier-formats .tsx and .html too.
  • Docs. Wiki reference reference/console-stack, a "One stack for the consoles" section in the hosted-service model page, the --console flag in the add-a-hosted-service how-to, and one line in AGENTS.md.

Deliberately outside the catalog: @playwright/test (the ci-playwright promotion rewrites each exact pin with the image digest), @types/bun, and @tanstack/react-table / @tanstack/react-form until first used (knip rejects unused catalog entries; the stack rules track them in CATALOG_PENDING).

Demo

bun run check-console-stack, the per-app deviations that exist today (each with its allowlist reason):

s0-demo.cast (terminal recording)

app         deviation  library                     reason
----------  ---------  --------------------------  -----------------------------------------------------------------------
Hub         missing    @tanstack/react-router      TanStack Router lands with the app's router PR
Hub         missing    @prisma/adapter-pg          Prisma on SQLite until Hub's PostgreSQL move
Hub         banned     @prisma/adapter-libsql      Prisma on SQLite until Hub's PostgreSQL move
Hub         banned     react-router                react-router until Hub-R
Delivery    missing    @trpc/client                125 REST routes until Delivery's tRPC API PR
Delivery    missing    @trpc/server                125 REST routes until Delivery's tRPC API PR
Delivery    missing    @trpc/tanstack-react-query  125 REST routes until Delivery's tRPC API PR
Tracker     missing    @tanstack/react-router      TanStack Router lands with the app's router PR
Tracker     missing    @trpc/tanstack-react-query  plain tRPC client until Tracker moves to the TanStack Query integration
Tracker     banned     react-router                react-router until Tracker-R
Errors      missing    @tanstack/react-router      TanStack Router lands with the app's router PR
Errors      missing    @trpc/client                browser and callers use REST until the app's tRPC API PR
Errors      missing    @trpc/server                browser and callers use REST until the app's tRPC API PR
Errors      missing    @trpc/tanstack-react-query  browser and callers use REST until the app's tRPC API PR
Errors      missing    @hono/bun                   static files served by hand until the shared server kit
Errors      banned     react-router                react-router until Errors-R
Mail        missing    @tanstack/react-router      TanStack Router lands with the app's router PR
Mail        missing    @trpc/client                browser and callers use REST until the app's tRPC API PR
Mail        missing    @trpc/server                browser and callers use REST until the app's tRPC API PR
Mail        missing    @trpc/tanstack-react-query  browser and callers use REST until the app's tRPC API PR
Mail        missing    prisma                      raw SQLite until the app's PostgreSQL and Prisma PR
Mail        missing    @prisma/client              raw SQLite until the app's PostgreSQL and Prisma PR
Mail        missing    @prisma/adapter-pg          raw SQLite until the app's PostgreSQL and Prisma PR
Mail        banned     react-router                react-router until Mail-R
Flags       missing    @tanstack/react-router      TanStack Router lands with the app's router PR
Flags       missing    @trpc/client                browser and callers use REST until the app's tRPC API PR
Flags       missing    @trpc/server                browser and callers use REST until the app's tRPC API PR
Flags       missing    @trpc/tanstack-react-query  browser and callers use REST until the app's tRPC API PR
Flags       missing    prisma                      raw SQLite until the app's PostgreSQL and Prisma PR
Flags       missing    @prisma/client              raw SQLite until the app's PostgreSQL and Prisma PR
Flags       missing    @prisma/adapter-pg          raw SQLite until the app's PostgreSQL and Prisma PR
Flags       banned     react-router                react-router until Flags-R
Feeds       missing    @tanstack/react-router      hand-rolled router until Feeds' router PR
Feeds       missing    @trpc/client                browser and callers use REST until the app's tRPC API PR
Feeds       missing    @trpc/server                browser and callers use REST until the app's tRPC API PR
Feeds       missing    @trpc/tanstack-react-query  browser and callers use REST until the app's tRPC API PR
Feeds       missing    prisma                      raw SQLite until the app's PostgreSQL and Prisma PR
Feeds       missing    @prisma/client              raw SQLite until the app's PostgreSQL and Prisma PR
Feeds       missing    @prisma/adapter-pg          raw SQLite until the app's PostgreSQL and Prisma PR
Go link     missing    @tanstack/react-query       browser and callers use REST until the app's tRPC API PR
Go link     missing    @tanstack/react-router      single page reading the URL by hand until Go link's router PR
Go link     missing    @trpc/client                browser and callers use REST until the app's tRPC API PR
Go link     missing    @trpc/server                browser and callers use REST until the app's tRPC API PR
Go link     missing    @trpc/tanstack-react-query  browser and callers use REST until the app's tRPC API PR
Go link     missing    @hono/bun                   static files served by hand until the shared server kit
Charts      missing    @tanstack/react-query       single page reading the URL by hand until Charts' client PR
Charts      missing    @tanstack/react-router      single page reading the URL by hand until Charts' client PR
CI cache    missing    @tanstack/react-query       single page reading the URL by hand until CI cache's client PR
CI cache    missing    @tanstack/react-router      single page reading the URL by hand until CI cache's client PR
console-ui  missing    @tanstack/react-table       console-ui gains it with the shared DataTable and form pieces
console-ui  missing    @tanstack/react-form        console-ui gains it with the shared DataTable and form pieces

51 allowlisted deviation(s) across 11 packages.
check-console-stack: OK

Allowlisted deviations per app: Hub 4, Delivery 3, Tracker 3, Errors 6, Mail 8, Flags 8, Feeds 7, Go link 6, Charts 2, CI cache 2, console-ui 2.

Verification

  • bun install --frozen-lockfile passes. bunx turbo run typecheck lint test --filter=<ten consoles> --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/ops-model: 56 of 56 tasks pass (Delivery 1186 tests, console-ui, ops-model, all consoles).
  • bun run check-console-stack, check-floating-deps, renovate-hints, react-version-sync, script-coverage, check-test-standardization, check-script-migrations, check-directory-file-counts pass; their and the Renovate/scaffolder suites pass. check-agent-guidance reports only the existing personal-agent drift against the live home file.
  • bun scripts/tools/knip.ts: only the existing #generated unresolved imports. bun run jscpd baseline ratchet passes. Wiki builds (150 pages); new routes and the #one-stack-for-the-consoles anchor resolve.
  • A throwaway --console package (scaffolded into the workspace, then removed) typechecked, linted, tested, built with Vite, and served /healthz, /trpc/hello and the client with Bun.
  • bunx lefthook run pre-commit on staged files passes.
  • Extended tier, scoped to the touched workspaces: bunx turbo run test:extended --filter=<ten consoles> --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/ops-model --filter=@shepherdjerred/root-scripts --continue: 25 of 25 tasks pass.
  • Not run: live Renovate PR creation against the catalog (Mend-hosted Renovate cannot run bun install, so a catalog bump leaves bun.lock for a human to refresh), the whole-repo extended tier (the root package.json change makes ...[origin/main...HEAD] cover every workspace; I ran it scoped to the touched workspaces instead), deployment (no runtime change).

🤖 Generated with Claude Code

@shepherdjerred

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@greptile-apps

greptile-apps Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shepherdjerred
shepherdjerred marked this pull request as ready for review November 26, 2026 20:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T21:15:20.292097Z 7cfe224 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shepherdjerred

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Automated re-review request for 0001412 from the CI review gate.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for 3c2d73a from the CI review gate.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 3c2d73a68c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shepherdjerred
shepherdjerred force-pushed the console-stack-standard branch 2 times, most recently from db0b137 to 7cfe224 Compare November 26, 2026 21:11

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cfe224c77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

shepherdjerred and others added 2 commits November 28, 2026 11:46
…stack check

Why
The ten first-party ops consoles shared React, Vite, TypeScript, Vitest, Zod
and console-ui, then diverged below that: React Router beside TanStack Router
and hand-rolled routing, REST beside tRPC, raw SQLite beside Prisma. Nothing
wrote the standard down, kept versions aligned, or stopped a new console from
starting from a bare server.

What
- Root Bun `catalog` of the shared library versions (nothing upgraded); the ten
  consoles, console-ui and ops-model declare them as `catalog:`.
- Renovate reads the catalog through a JSONata custom manager (its npm manager
  does not read `catalog`); `check-floating-deps` accepts `catalog:`.
- `bun run check-console-stack` (wired into package.json, turbo and verify):
  required libraries, banned alternatives, `catalog:` use, Rust-console
  exceptions, and a per-app allowlist of today's deviations that can only
  shrink.
- Mail, Flags and Feeds lint with the React rules; their `useEffect` calls are
  replaced with ref callbacks, `<title>` and derived state.
- `new-service.ts --console` scaffolds the standard stack.
- Wiki reference `console-stack`, the why in the hosted-service model page, the
  how-to flag, and one line in AGENTS.md.

Verification
- `bun install --frozen-lockfile`; `bunx turbo run typecheck lint test` over
  the ten consoles, console-ui and ops-model: 56 of 56 tasks pass.
- check-console-stack, check-floating-deps, renovate-hints and the Renovate,
  scaffolder and root-scripts suites pass; knip shows only the existing
  `#generated` unresolved imports; jscpd ratchet passes; wiki builds.
- A scaffolded `--console` package typechecks, lints, tests, builds and serves
  `/healthz`, `/trpc` and the client.
- Renovate extraction of the catalog verified with a local `renovate
  --dry-run=extract`.
- Not run: live Renovate PR creation; deployment (no runtime change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them

Why
CU2–4 (#5430) added @tanstack/react-table and @tanstack/react-form to
console-ui (and react-form to Hub). The stack standard kept both in
CATALOG_PENDING until a package declared them, and allowlisted console-ui
as "missing" them; both entries are now stale and the stack check fails.

What
- Root catalog gains @tanstack/react-table ^9.3.1 and @tanstack/react-form
  ^1.33.6, the versions CU2–4 declared; console-ui and Hub use catalog:.
- CATALOG_PENDING is empty and console-ui's two "missing" allowlist entries
  are gone; the wiki's "outside the catalog" table drops their row.

Verification
- `bun install --frozen-lockfile` passes; `bun run check-console-stack`: OK.
- `bunx turbo run typecheck test lint --filter=@shepherdjerred/root-scripts
  --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/alert-dashboard`:
  34/34.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why
Review of #5275 (codex P1): packages/docs/wiki/AGENTS.md requires every
claim about the system to link the source file that proves it, and the
console-stack reference named its sources only as inline code.

What
- Links the root package.json (catalog), renovate.json (catalog manager),
  scripts/checks/check-console-stack.ts, scripts/checks/console-stack-rules.ts
  and the scaffolder scripts/misc/new-service-console.ts.

Verification
- package.json and renovate.json return 200 on main; the three scripts this
  PR adds return 200 on the pushed console-stack-standard branch and resolve
  on main once it merges (rechecked after merge).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shepherdjerred
shepherdjerred merged commit da9ae8d into main Nov 28, 2026
3 of 10 checks passed
@shepherdjerred
shepherdjerred deleted the console-stack-standard branch November 28, 2026 20:00
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