Skip to content

fix(#175): portal navigation consistency — Home link, user dropdown, About page, no dead links#176

Merged
dfcoffin merged 5 commits into
mainfrom
fix/175-portal-home-link
Jun 8, 2026
Merged

fix(#175): portal navigation consistency — Home link, user dropdown, About page, no dead links#176
dfcoffin merged 5 commits into
mainfrom
fix/175-portal-home-link

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Portal navigation/footer consistency pass driven by browser testing. Closes #175.

Changes

  • Home link on every portal page: added Home (→ /) to the custodian and customer navbars (the customer page was previously a dead end).
  • User menu: replaced the awkward Custodian: name / Welcome, name text + loose Logout button with a proper user dropdown (username ▾ → Logout) in both portal navbars, matching the main header. Logout remains a CSRF POST.
  • Customer reachability: the shared header now shows a My Authorizations link for ROLE_USER, so a logged-in customer can reach their authorizations from anywhere (e.g. the home page).
  • Footer dead links: added a real public About page (/about, implementation/version info — replaces legacy about.jsp) and removed the Terms of Service / Usage Policy links rather than ship stale EnergyOS-era boilerplate or fabricated legal text. (Happy to add real ToS/Usage Policy when official copy is provided.)
  • Home CTA: "Learn more about Green Button" now links to https://www.greenbuttonalliance.org/.
  • /about added to the session chain (public).

Verification (local sandbox)

/about 200 (public, anonymous); custodian + customer user dropdowns render and Logout works; customer Home shows "My Authorizations"; learn-more → GBA; Home reachable from both portals. Full openespi-datacustodian suite: 160 tests, 0 failures.

🤖 Generated with Claude Code

dfcoffin and others added 2 commits June 7, 2026 17:10
The customer self-service page was a dead end (navbar linked only to itself and
Logout). Add a persistent "Home" item (-> /) to both portal navbar fragments so
every authenticated page has a consistent way back to the site landing.

Verified: custodian and customer pages each render one Home link; Home resolves
(200) from a customer session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ge, footer cleanup

Follow-on navbar/footer consistency fixes from browser testing:

- User menu: replace the awkward "Custodian: name" / "Welcome, name" text + loose
  Logout button with a proper user dropdown (username ▾ → Logout) in both the
  custodian and customer navbars, matching the main header.
- Logged-in customers can reach their authorizations from anywhere: the shared
  header now shows a "My Authorizations" link for ROLE_USER (e.g. on the home page).
- Footer dead links: add a real public About page (/about — implementation/version
  info; replaces legacy about.jsp) and remove the Terms of Service / Usage Policy
  links rather than ship stale EnergyOS-era boilerplate or fabricated legal text.
- Home "Learn more about Green Button" now links to greenbuttonalliance.org.
- /about added to the session chain (public).

Verified: /about 200 (public); custodian/customer user dropdowns + logout; customer
home shows My Authorizations; learn-more → GBA. datacustodian suite 160/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin changed the title fix(#175): add Home link to custodian + customer portal navbars fix(#175): portal navigation consistency — Home link, user dropdown, About page, no dead links Jun 7, 2026
dfcoffin and others added 3 commits June 7, 2026 19:21
- Logout dropdown was dead on the new portal pages: Bootstrap's JS was only
  loaded ad-hoc at the bottom of some templates, not on the pages that include
  just the head/footer fragments. Load the Bootstrap bundle once (deferred) in
  the head fragment so every page has working dropdown/collapse, and remove the
  now-duplicate bottom <script> from home/custodian-home (double-loading
  re-binds the data-API and breaks the toggle).
- User-account form now has an "Account type" selector (Customer / Administrator
  (Custodian)), so admins can be created — not just customers. update() persists
  the role; create() binds it. Verified: a new ROLE_CUSTODIAN account logs in and
  lands on /custodian/home. Relabeled the screen to "User Account" / "Add user".

datacustodian suite: 160 tests, 0 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Error pages (404 error.html, 400, 403): "Go Home"/"Login" used host-absolute
  hrefs that bypassed the /DataCustodian context path (dead links) -> context-
  relative th:href. Removed their duplicate bottom Bootstrap <script>/icons (now
  provided once by the head fragment; double-loading broke the navbar dropdown).
  Browser-rendered HTML error page link targets all verified 200 (API clients
  still get a JSON error via content negotiation, as before).
- Accounts were always "Enabled = Yes" with no way to change it. Added an Enabled
  switch to the user-account form; update() persists it. A disabled account now
  shows "No" in the list and cannot sign in.

datacustodian suite: 160 tests, 0 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nButton-Java repo

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit f50fa50 into main Jun 8, 2026
4 checks passed
@dfcoffin dfcoffin deleted the fix/175-portal-home-link branch June 8, 2026 03:22
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.

Portal navbars: add consistent Home link (customer page is a dead end)

1 participant