Skip to content

Configurable home banner#1

Open
veej wants to merge 3 commits into
mainfrom
feat/configurable-home-banner
Open

Configurable home banner#1
veej wants to merge 3 commits into
mainfrom
feat/configurable-home-banner

Conversation

@veej
Copy link
Copy Markdown
Owner

@veej veej commented Apr 25, 2026

Problem

The home banner is set in code, so any change to the message or its accent requires a deploy. The team wanted to update it from inside the app — no PR cycle for an announcement — but only admins should be able to.

Solution

A new Settings view, available only to admins via a "Settings" link in the top navigation, exposes a simple form: a message field and a four-option accent picker (sky / amber / emerald / rose). Saving persists to localStorage and lands the admin back on the home page with the updated banner. Regular users do not see the link in the navigation, and App.jsx won't render the Settings view if the active session is not an admin.

The form refuses empty submissions (Save stays disabled) and caps the message at 140 characters — both decisions are documented in docs/specs/configurable-banner.md.

Test plan

  1. Sign in as admin@foyer.local / admin. The home page shows the default banner ("Welcome to Foyer", sky accent).
  2. Click Settings in the top nav. The form is pre-filled with the current message and accent.
  3. Change the message to a non-empty value (e.g. "All hands on Friday at 10"), pick a different accent (e.g. amber), click Save. You land on the home page and the banner reflects both changes.
  4. Click Settings again, clear the message field. The Save button becomes disabled.
  5. Sign out. Sign in as user@foyer.local / user. The home page shows the same updated banner. The Settings link is not in the navigation.

Evidence

demo.mp4

@veej veej force-pushed the feat/configurable-home-banner branch 2 times, most recently from d5e2c4f to ecbc0b1 Compare April 25, 2026 21:00
Adds a Settings view, accessible only to admins via a "Settings" link
in the top navigation, that lets them edit the home banner's message
and accent. Saving lands the admin back on the home page with the
updated banner. Regular users see no entry point and are kept out
of the settings view if they reach it through some other path.

Acceptance tests cover the four scenarios from
`tests/acceptance/features/configurable-banner.feature` and map to
R.1 (message), R.2 (accent), and R.3 (regular-user gate) tracked
in `tests/acceptance/test-plan.yaml`.

Implementation notes:
- `setBanner()` validates the message is non-empty and the accent is
  in the palette before persisting.
- The Settings form is pre-filled with the current banner, refuses
  empty submissions (Save stays disabled), and caps the message at
  140 characters.
- App.jsx grew a `view` state and a `bannerVersion` counter so the
  HomeView re-renders with fresh banner data after a save.

See `docs/specs/configurable-banner.md` for the agreed scope and the
decisions made during the AC review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@veej veej force-pushed the feat/configurable-home-banner branch from ecbc0b1 to 15e909e Compare April 25, 2026 21:02
veej and others added 2 commits April 27, 2026 11:24
Drop the `if: failure()` guard on the artifact upload so the report is
available also on green runs — useful for inspecting timings, demoing
the run, and linking the report from external docs (e.g. slides).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The runner-side prettier flagged .claude/testing_rules.md as
mis-formatted while the same file passed locally with the same
prettier 3.8.3 and lockfile. Rather than chase the environment-
specific divergence, broaden the ignore list to cover all of
.agents/, .claude/, and .cursor/ — none of these contain product
code that should be subject to project formatting rules.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant