Skip to content

fix(pwa): N23 — ❓ on pre-login screens with a top bar can be tapped again - #192

Merged
satishbagali merged 1 commit into
mainfrom
fix/help-button-top-bar
Dec 5, 2026
Merged

satishbagali merged 1 commit into
mainfrom
fix/help-button-top-bar

Conversation

@Aiyappa-DigitalGreen

Copy link
Copy Markdown
Collaborator

Fixes N23 (Help button covered). PWA only, backend unchanged.

Cause

  • On Register, Forgot PIN, Verify e-mail and Set new PIN, the ❓ floated with position: absolute; zIndex: 30.
  • Each of those screens has a sticky, transparent, full-width top bar with zIndex: 40 covering the same spot, so every tap landed on the bar.
  • The overlap came in with N11 (1eb3411).

Fix

  • On those four screens, the ❓ replaces the empty 40px spacer inside the top bar, level with Back. There is no floating copy any more.
  • Welcome and Login have no top bar, so they keep the floating ❓.
  • The floating prop is now documented as "only for a screen with no top bar".

Guards against the same regression

  • help-button-placement.test.ts reads the source of every screen that has a ❓:
    • A floating ❓ fails the test if its screen has a sticky bar, a Back button or a <Toolbar>.
    • A screen with a top bar fails the test if it floats its ❓.
    • This is a source check because jsdom has no layout, so a click in a render test reaches a covered button. That is how N11 slipped through.
  • The register, forgot-pin, verify-email and set-new-pin tests each now check that the ❓ is in the same bar as Back, isn't absolutely positioned, and opens /help/topic?screen=<key>.
  • I confirmed the guard catches the bug: with the old forgot-pin page put back, 3 tests fail.

Checked in a real browser (headless Chrome, 390px)

  • I took the element at the ❓'s centre with elementFromPoint.
  • On Production today it is the sticky bar on Forgot PIN, Verify e-mail and Set new PIN.
  • With this branch it is the ❓ itself on all six pre-login screens.

The gate passes on Node 20: lint, lint:promises, typecheck, format:check, i18n:check and test:coverage.

After the Production deploy, please tell the backend owner so the reporting user can be informed.

🤖 Generated with Claude Code

…gain

Register, Forgot PIN, Verify e-mail and Set new PIN floated the ❓
(zIndex 30) under their sticky transparent top bar (zIndex 40), so every
tap hit the bar. The ❓ now sits inside the bar in place of the empty 40px
spacer, level with Back. Welcome and Login (no bar) keep the floating ❓.

Guards against the same regression:
- help-button-placement.test reads every screen's source: a floating ❓
  is only allowed on a screen with no sticky bar / Back / Toolbar, and a
  screen with a bar must not float it (jsdom has no layout, so a render
  test alone can't see the overlap).
- Each of the four screens' tests checks the ❓ shares the bar with Back,
  isn't absolutely positioned, and opens /help/topic?screen=<key>.

Checked in headless Chrome at 390px: before, elementFromPoint at the ❓'s
centre was the sticky bar on Production; after, it is the ❓ on all six
pre-login screens.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 4, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@satishbagali
satishbagali merged commit d7fed92 into main Dec 5, 2026
7 checks passed
@satishbagali
satishbagali deleted the fix/help-button-top-bar branch December 5, 2026 01:35
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.

2 participants