Skip to content

feat(web-ui): migrate drifted buttons to canonical Button + add raw-<… - #616

Merged
Weegy merged 2 commits into
byte5ai:mainfrom
sneumannb5:feat/290-lume-migration
Aug 9, 2026
Merged

feat(web-ui): migrate drifted buttons to canonical Button + add raw-<…#616
Weegy merged 2 commits into
byte5ai:mainfrom
sneumannb5:feat/290-lume-migration

Conversation

@sneumannb5

@sneumannb5 sneumannb5 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What

Closes #290. Migrate the 27 post-#291 rectangular text CTAs that drifted in across web-ui/app to the canonical <Button> (§4.2 variants, §6.4 press feel, §7.3 busy), and add an error-level ESLint no-restricted-syntax gate so raw <button> can't silently drift back.

Why

Post-merge features kept adding raw <button> (200 at the drift peak) — the material layer preserved the look but not the press feel, and per-call className soup re-diverged from the spec variants. The lint gate turns the recurring manual audit into a permanent one; every deliberate non-candidate (tabs/toggles, icon-only chrome, text links, selection tiles, warning-outline/§10 and --highlight actions, global-error.tsx) carries an inline disable + reason (185 total). One solid bg-danger rollback normalized to the transparent danger variant per §7.5.

Test plan

  • npx tsc --noEmit — 0 errors
  • npm run lint — 0 errors (new gate green; only pre-existing warnings)
  • npm run i18n:check — OK, 3339 keys (no strings/keys added)
  • npx vitest run — 552/552
  • npm run build — green
  • manual: headless-Chrome screenshot of every migrated variant/size/state in light and dark — accent fills, §7.3 busy dots, transparent danger, contrast all correct

Risk / blast radius

web-ui only. No schema, public API, env-var, or CI/release changes. Migrations change some at-rest visuals by design (ink/--bg-inverse fills → accent; solid bg-danger → transparent danger per §7.5) — verified in both themes. Large file count (93) is inherent to the error-level gate touching every raw-button site.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

sneumannb5 and others added 2 commits August 5, 2026 13:50
# Conflicts:
#	web-ui/app/_components/ChatTabs.tsx
#	web-ui/app/_components/StreamToasts.tsx
@Weegy
Weegy merged commit f5b7038 into byte5ai:main Aug 9, 2026
9 checks passed
Weegy added a commit to sneumannb5/omadia that referenced this pull request Aug 12, 2026
Merging current main into this branch surfaced three things the branch's
last CI run (2026-08-03) could not have caught:

- The raw-<button> lint gate added by byte5ai#616 on 2026-08-09 makes CopyIdButton
  a hard eslint error. It is a bespoke inline data chip whose own label is
  the key id in the mono-data register, so it takes the rule's documented
  escape hatch with a reason, matching the SlotEditor/graph precedent.
- The `reloadSeqRef` out-of-order guard was asserted by no test: deleting
  the sequence check left all 15 tests green. Added a regression test that
  resolves the mount fetch after a post-create reload and asserts the stale
  list is discarded — it fails without the guard and passes with it.
- Dropped the internal issue numbers from the admin card description
  (en + de). They mean nothing to an operator, and the catalog had only one
  other such reference in 3565 keys.

Also adds the CHANGELOG entry under [Unreleased] that the orphaned twin of
this work (byte5ai#551, merged into an already-squashed base and never reaching
main) carried.
Weegy added a commit that referenced this pull request Aug 12, 2026
* feat(web-ui): admin UI for channel API keys (#567)

* fix(web-ui): unblock api-keys admin UI on current main

Merging current main into this branch surfaced three things the branch's
last CI run (2026-08-03) could not have caught:

- The raw-<button> lint gate added by #616 on 2026-08-09 makes CopyIdButton
  a hard eslint error. It is a bespoke inline data chip whose own label is
  the key id in the mono-data register, so it takes the rule's documented
  escape hatch with a reason, matching the SlotEditor/graph precedent.
- The `reloadSeqRef` out-of-order guard was asserted by no test: deleting
  the sequence check left all 15 tests green. Added a regression test that
  resolves the mount fetch after a post-create reload and asserts the stale
  list is discarded — it fails without the guard and passes with it.
- Dropped the internal issue numbers from the admin card description
  (en + de). They mean nothing to an operator, and the catalog had only one
  other such reference in 3565 keys.

Also adds the CHANGELOG entry under [Unreleased] that the orphaned twin of
this work (#551, merged into an already-squashed base and never reaching
main) carried.

---------

Co-authored-by: Weegy <mwege@byte5.de>
Weegy added a commit to sneumannb5/omadia that referenced this pull request Aug 12, 2026
… guard

Two things surfaced only after merging current main:

- PR byte5ai#616's `no-restricted-syntax` gate for raw <button> landed on
  2026-08-09, five days after this branch's last green CI run, and rejects
  six buttons on the datasets page. All six are the rule's own listed
  non-candidates (a bare text link in a table cell, a close link, and two
  pager pairs), so they get the documented escape-hatch comment with a
  reason, matching the idiom already used in admin/duplicates, admin/mcp
  and admin/providers.

- The detailSeq generation guard was asserted by nothing: deleting it left
  the suite 11/11 green. The guard's real job is not "do not repaint a
  closed panel" (`selected` already covers that) but "a row page from the
  dataset you just closed must not land in the next dataset's panel" —
  and that mismatch is silent, because rows render as
  `selected.columns x row[col.name]", so foreign rows show up as blank
  cells rather than visibly wrong text. The new test pins it on the row
  footer instead, and goes red when the guard is removed.
Weegy added a commit that referenced this pull request Aug 13, 2026
main's no-restricted-syntax rule (the Lume button ratchet, #616) landed
after this branch was written and rejects the raw <button> the banner
used for its dismiss action. Migrated to <Button variant="secondary">,
matching ConfirmDialog's precedent for a cancel-style affordance; the
uppercase/tracking classes are kept so it still reads as a pair with the
adjacent settings link.

web-ui lint: 0 errors (was 1).
Weegy added a commit that referenced this pull request Aug 13, 2026
…surfaced (#471)

* feat(deploy): one-click Render blueprint + one-command Fly.io deploy

render.yaml backs a 'Deploy to Render' button: middleware + admin UI from
the published GHCR images, managed Postgres 17 (pgvector), a persistent
/data disk, and a generated VAULT_KEY — the /setup wizard collects the
LLM key at runtime, so a deploy needs zero pasted secrets. MIDDLEWARE_URL
reaches the web-ui via fromService/envVarKey RENDER_EXTERNAL_URL.

Fly has no blueprint-style button, so fly/deploy.sh is the one-command
equivalent: three apps (pgvector/pgvector:pg17 private-only, middleware
with /data volume, web-ui), volumes, and generated secrets. Fly's own
Postgres offerings don't fit (postgres-flex ships without pgvector,
Managed Postgres gates the vector extension behind a dashboard toggle),
hence the same pgvector image the compose stack uses. Smoke-tested end
to end on a live Fly org.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(web-ui): resolve MIDDLEWARE_URL at request time — route handlers replace baked rewrites

Next evaluates rewrites() at build time and freezes the destinations into
routes-manifest.json. The published web-ui image was built with
ARG MIDDLEWARE_URL=http://middleware:8080, so every browser call through
/bot-api proxied to a hostname that only exists on the compose network —
on Fly/Render/any other host the proxy died with ENOTFOUND and every
operator page showed 'GET … failed: 500'. Runtime MIDDLEWARE_URL was
silently ignored (only server-side fetches honored it, which is why page
shells still rendered).

/bot-api/* and /p/* are now catch-all route handlers backed by
app/_lib/middlewareProxy.ts, resolving MIDDLEWARE_URL per request:
streaming both directions (SSE, plugin-ZIP uploads), multiple Set-Cookie
preserved, redirects passed through, hop-by-hop headers stripped. One
image now runs anywhere; the compose default still works because compose
sets the same value as runtime env.

Consequences swept: Dockerfile build ARG removed (with a warning against
reintroducing it), CI workflows no longer pass the inert build-arg, the
compose build overlay drops it, and desktop-apps.yml stops pretending to
bake the kernel URL — the desktop supervisor already injects it at spawn
(this also fixes the latent wrong-port proxy when the kernel doesn't get
its preferred port).

Verified: 6 regression tests (core assertion: same handler, changed env,
changed target), plus a live Fly deployment where /bot-api/v1/auth/providers
went 500 → 200 and login started working.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(web-ui): first-run readiness banner; fix 17 broken t.rich placeholders; unbreak next dev

Three first-run findings from smoke-testing the one-click deploy:

1. Readiness banner. A fresh install has no LLM key, so the orchestrator
   never publishes chatAgent@1/orchestratorRegistry@1 and every operator
   surface answers 503 multi_orchestrator_unavailable — the UI showed raw
   'GET … failed: 503' strings with no hint at the cause.
   RuntimeReadinessBanner (mounted next to SessionWatcher) probes one
   operator route, and on the structured 503 shows a card naming the
   cause with a link to /admin/settings. Re-probes on focus + heartbeat
   while visible, so it clears itself the moment the key is saved.

2. t.rich placeholder syntax (regression from #447). 17 placeholders
   across 12 message keys used ICU argument syntax ({toolName}) while
   the component passes chunk functions — next-intl splices the raw
   function into the render output and React throws ('Functions cannot
   be passed to Client Components'), hard-crashing the routines page,
   login no-providers state, onboarding modal, builder preview, and four
   admin pages whenever those paths render. The locale-parity check
   couldn't catch it because both locales were consistently wrong. All
   converted to tag syntax (<toolName></toolName>) in en+de; audited to
   zero via a t.rich/message cross-check sweep.

3. next dev was 500ing on every page: Tailwind v4 scans comments as
   class candidates, and two test-file comments containing a literal
   bracket-class with var(...) compiled into invalid CSS (dev-only;
   prod builds tolerate it). Reworded the comments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(web-ui): use the canonical Lume Button in RuntimeReadinessBanner

main's no-restricted-syntax rule (the Lume button ratchet, #616) landed
after this branch was written and rejects the raw <button> the banner
used for its dismiss action. Migrated to <Button variant="secondary">,
matching ConfirmDialog's precedent for a cancel-style affordance; the
uppercase/tracking classes are kept so it still reads as a pair with the
adjacent settings link.

web-ui lint: 0 errors (was 1).

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Marcel Wege <mwege@byte5.de>
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.

Lume: migrate buttons to the canonical Button component

2 participants