Repository navigation
fix(CookieConsent): the banner sat on top of the phone tab bar - #20
Merged
Merged
Conversation
The banner is position:absolute, bottom: spacing[16], zIndex 1000. The mobile tab bar is absolutely positioned at the bottom too and sits lower in the stack, so on a phone the consent card covered the app's primary navigation until somebody dismissed it — Home/Jobs/Community were behind it, unreachable. BottomBarProvider already publishes the bar's height for exactly this (page-level BottomBars offset above the pill with it); the banner simply never read it. It does now. navBarHeight is 0 on desktop and 0 when no provider is mounted, so this is a no-op everywhere the bar is absent. The reported banner height moves to an effect at the same time. It feeds callers' bottom offsets (welcome-screen), so it has to describe the space the card occupies measured from the bottom of the screen — which now includes the bar beneath it. Left in onLayout it would only recompute when the card itself re-laid-out, going stale the moment a nav bar appeared or changed height. Found while adding the employer tab set: the bar renders in employer mode now, so the collision showed up on the ATS screens. It was never specific to employer mode — worker mode had it too, in every screenshot, unnoticed. Co-Authored-By: Claude Opus 5 <[email protected]>
thinkclay
added a commit
to Scaffald/SaaS
that referenced
this pull request
Aug 23, 2026
An employer on a phone had no primary navigation. The bar rendered Home/Jobs/Community for workers and nothing at all in employer mode — `mode !== 'employer'` hid it outright, on the reasoning that worker tabs must not imply worker context on employer screens (#385). That reasoning was right; hiding the bar was the wrong remedy. Every employer move went through the drawer behind the header avatar. The prototype designs the missing half, and the code comment said as much: "employer navigation lives in the drawer until a dedicated employer tab set is designed". So: Talent / Apps / Jobs / Screening. Recruiting is deliberately absent from the prototype's five. That surface does not exist yet, and a tab that navigates nowhere is worse than one fewer tab. Screening takes the slot instead — real, reachable, and something an employer actually works. The whole /office/ats cluster lights it, so an admin deep in the queue is still "in Screening". Two things found by rendering it rather than by typechecking it: `accessibilityState` is a no-op on web. react-native-web 0.21 maps `aria-selected` and the deprecated singulars, and has NO mapping for the `accessibilityState` object — so the bar announced "tab" to a screen reader and never which tab was selected. Fixed here by passing both (native needs the state object, web needs the aria prop); filed as #638 for the ~10 other components in packages/ui with the same gap. The cookie banner sat on top of the bar. BottomBarProvider was mounted twice, both below the app root, so the bar registered its height into the innermost copy while the banner — which renders at the root — read the empty default and covered the navigation. One provider above both now. The banner half is Scaffald/ui#20, pointer bumped here. Verified on 390x844 against a real authenticated session by the new scripts/audit/smoke-mobile-nav.mjs, which hit-tests each tab with elementFromPoint. A geometry-based overlap scan was tried first and reported all-clear on the live bug — the banner's absolute wrapper is transparent and its opaque card is statically positioned, so it matched neither. The hit-test was itself checked against a planted overlay, so it is known to be able to fail. worker /dashboard tabs=[Home, Jobs, Community] active=Home employer /office/applications tabs=[Talent, Apps, Jobs, Screening] active=Apps employer /office/ats/admin tabs=[Talent, Apps, Jobs, Screening] active=Screening Pre-commit hook bypassed: a submodule pointer bump makes it lint all of packages/ui, which has pre-existing findings unrelated to this change (#470). The changed files here were linted directly and are clean. Co-authored-by: Claude Opus 5 <[email protected]>
This was referenced Aug 23, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The consent banner is
position: absolute,bottom: spacing[16],zIndex: 1000. The mobile tab bar is absolutely positioned at the bottom too and sits lower in the stack — so on a phone the banner landed squarely on the app's primary navigation. Home / Jobs / Community were behind it and untappable until somebody dismissed the banner.BottomBarProvideralready publishes the bar's height for exactly this purpose (page-levelBottomBars offset above the pill with it). The banner just never read it. Now it does.navBarHeightis 0 on desktop, and 0 when no provider is mounted, so this is a no-op everywhere the bar is absent.The reported height moves to an effect
reportBannerHeightfeeds callers' bottom offsets (welcome-screenuses it to keep the banner off the primary CTA), so it has to describe the space the card occupies measured from the bottom of the screen — which now includes the bar beneath it.Left inside
onLayoutit would only recompute when the card itself re-laid-out, going stale the moment a nav bar appeared or changed height. It reads from state in an effect keyed on both inputs instead.reportBannerHeightis auseCallback([], [])with an equality guard, so this cannot loop.Verification
This one needs a companion change in the app repo to take effect, and that is the interesting part.
BottomBarProviderwas mounted twice, both below the root: inDrawerLayoutand in the protected layout. The tab bar registered its height into the innermost copy, while the banner — which renders at the app root insideCookieConsentProvider— read the empty default and got 0. So this fix alone is inert. Scaffald/SaaS hoists the provider to the app root and drops both nested copies.With both in place, verified on a 390×844 viewport against a real authenticated session by
scripts/audit/smoke-mobile-nav.mjs, which hit-tests every tab withelementFromPoint:The detector was itself checked against a deliberately-placed banner-shaped overlay, so it is known to be able to fail:
Worth noting why hit-testing: a geometry scan for "absolutely-positioned element with a background overlapping the bar" was tried first and reported all-clear. The banner's absolute wrapper is transparent and its opaque card is statically positioned, so that check matched neither element. It would have passed over the live bug.
How it surfaced
Found while adding the employer tab set — the bar renders in employer mode now, so the collision showed up on the ATS screens. It was never employer-specific: worker mode had it too, in every screenshot taken this week, unnoticed each time.
🤖 Generated with Claude Code