Skip to content

fix(homepage): hide broken directory-footer links + sign-in padlock (#1651) - #1656

Merged
jung-thomas merged 1 commit into
mainfrom
worktree-issue-1651-footer-links
Aug 11, 2026
Merged

jung-thomas merged 1 commit into
mainfrom
worktree-issue-1651-footer-links

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Closes #1651.

Problem

The homepage directory footer (row 7) and the per-verb sub-pages (/build/, /operate/, …) rendered every HomepageShelves entry regardless of the nightly link-health verdict. Visitors clicked links the homepage-link-health job already flagged BROKEN (e.g. the reporter's BTP-CLI example). Only the community lane filtered them. The issue also asked that links requiring a logon be marked so users know before clicking.

Changes

  • Hide BROKEN links — directory-footer.html skips linkStatus == "BROKEN"; verb/list.html filters them out of the shelf query (so the section count + list both exclude them). linkStatus is already baked into homepage_shelves.json by the SELECT-all /build/homepage-shelves feed, so this auto-heals when a link is fixed — no new plumbing.
  • Sign-in padlock — new HomepageShelves.requiresLogin (Boolean, default false; additive .hdbtable column; admin-editable; intentionally omitted from the seed CSV so an HDI redeploy never wipes admin-curated values). Renders an accessible padlock (role="img", aria-label="Sign-in required") next to the link in both:
    • Hugo first-paint HTML via a new partials/homepage/login-lock.html, and
    • the LinkExplainerPopover Vue island (which replaces the anchor on hydration, so it must render its own copy).
  • Admin UI — requiresLogin added to the Homepage Shelves List Report + Object Page (app/admin-annotations.cds), editable at /admin-ui/#homepage.

Not addressed here (data curation, not code)

The reporter also noted "RAG on HANA Cookbook" points at generic github.com/SAP-samples. That row is linkStatus:OK (it resolves) — it's a wrong-target content fix for an admin via /admin-ui/#homepage, not a code change.

Verification

Real Hugo render (hugo -s hugo) with a requiresLogin=true fixture:

  • BROKEN SAP BTP Cockpit absent from the directory footer and /operate/.
  • Padlock present on a requiresLogin entry in the footer and on /build/ + /operate/; other links still render (non-empty).

Tests green:

  • LinkExplainerPopover.test.ts (+2 lock cases), test/unit/db/homepage-schema.test.js (+1), test/unit/admin-homepage-crud.test.js, test/unit/srv/build-feeds-explainers.test.js.
  • cds build --production emits requiresLogin BOOLEAN NULL DEFAULT FALSE on com.sap.developers.ims.HomepageShelves.hdbtable (plain hdbtable → safe online ALTER on deploy).

Note: test/hybrid/homepage-shelves-new-fields.test.js (HANA-backed) not run in this env; the additive column + admin annotation follow the existing #759 field pattern.

…1651)

The homepage directory footer (row 7) and verb sub-pages rendered every
shelf entry regardless of the nightly link-health verdict, so visitors
clicked links the job already knew were dead. Only the community lane
filtered BROKEN entries.

- directory-footer.html + verb/list.html now skip linkStatus=='BROKEN'
  rows (linkStatus is already baked into homepage_shelves.json via the
  SELECT-all build feed; auto-heals when a link is fixed).
- Add HomepageShelves.requiresLogin (Boolean, default false, additive
  hdbtable column, admin-editable, omitted from seed CSV) and render an
  accessible padlock affordance next to links that need a sign-in, in
  both the Hugo first-paint HTML (new login-lock.html partial) and the
  link-explainer Vue island (which replaces the anchor on hydration).
- Expose requiresLogin in the admin Homepage Shelves LR + Object Page.

Verified with a real Hugo render: BROKEN 'SAP BTP Cockpit' absent from
footer + /operate/, padlock present on a requiresLogin entry in the
footer and on /build/ + /operate/. Unit tests (popover + schema + admin
CRUD + build feed) green; cds build --production emits the new column.
@jung-thomas
jung-thomas marked this pull request as ready for review August 11, 2026 15:03
@jung-thomas
jung-thomas merged commit 6153bf5 into main Aug 11, 2026
6 checks passed
@jung-thomas
jung-thomas deleted the worktree-issue-1651-footer-links branch August 13, 2026 15:26
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.

[Feedback]: Broken links in footer

1 participant