Skip to content

fix(server): make header responsive on mobile - #1130

Merged
khaira777 merged 2 commits into
mainfrom
fm/flocafe-issue-1088-r1
Oct 14, 2026
Merged

khaira777 merged 2 commits into
mainfrom
fm/flocafe-issue-1088-r1

Conversation

@khaira777

@khaira777 khaira777 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1088

Intent

Verify and implement the surgical fix for FreeOpenSourcePOS/FloCafe issue #1088 ("Server App header action buttons are smaller than 44x44px touch target"): in frontend/src/app/server-standalone/page.tsx, size the Server App header action buttons to meet the 44x44px minimum touch target without breaking mobile header layout. Deliver via the no-mistakes pipeline as its own PR with Fixes #1088 in the PR summary. Add localized aria-label attributes identifying the Refresh and Logout actions, reuse existing translation keys where appropriate, extend the browser test to verify that both buttons have the correct accessible names in addition to their minimum 44x44px dimensions, and confirm that both actions still work and the header has no horizontal overflow at 320px and 390px widths.

What Changed

  • Sized the Refresh and Logout buttons in frontend/src/app/server-standalone/page.tsx with min-h-11 min-w-11 (44x44px) and centered flex alignment so they meet minimum touch target dimensions.
  • Added localized aria-label attributes (settings.refresh and nav.logout) to the Server App header Refresh and Logout buttons.
  • Extended frontend/e2e/server-app-ordering.spec.ts to assert accessible names, >= 44x44px bounding boxes across mobile viewports without horizontal overflow, and functional Refresh and Logout button clicks.

Fixes #1088

Risk Assessment

✅ Low: The change is a small, surgical UI and accessibility update sizing the two Server App header action buttons to 44x44px minimum touch targets with localized aria-labels and matching E2E browser assertions.

Testing

Built the backend and static frontend, ran the Playwright E2E suite e2e/server-app-ordering.spec.ts plus test:translations and test:rtl-kds-server-whatsapp, and drove live Playwright checks against the running Server App across 320px-768px viewports (including an adversarial long table name at 320px and Spanish locale at 390px), capturing screenshots and JSON measurements confirming 44x44px button dimensions, localized accessible names, working Refresh/Logout actions, and zero horizontal overflow.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
A server user opens the Server App across mobile viewports (320px, 375px, 390px, 430px, 768px) and inspects the header action buttons; both the Refresh and Logout buttons expose accessible names ('Ref… ✅ pass live cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.ts and `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…
A server user opens the Server App at 320px and 390px widths, including with an adversarial extra-long table name selected in the header subtitle; the subtitle truncates cleanly, neither the document… ✅ pass live ~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-320px.png, `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-390px.pn…
A server user switches the Server App language to Spanish ('es'); the Refresh and Logout header buttons expose localized aria-label attributes ('Actualizar' and 'Cerrar sesión') from the reused settin… ✅ pass live ~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-issue-1088-verification.json and npm run test:translations
A server user clicks the 44x44px Refresh header button at 390px width to reload tables from GET /api/tables, then clicks the 44x44px Logout header button and is returned to the Sign In screen ✅ pass live cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.ts and `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…

Server App header at 320px viewport width (44x44px Refresh and Logout buttons, no horizontal overflow)
Server App header at 390px viewport width (44x44px Refresh and Logout buttons, no horizontal overflow)
Server App header at 320px viewport width with adversarial long table name truncated cleanly without overflow
Server App Sign In screen after clicking the 44x44px Logout header button at 390px width

Evidence: Live Playwright verification measurements for Server App header buttons across viewports and locales

{ "320px": { "refreshAria": "Refresh", "logoutAria": "Logout", "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false, "headerHasOverflow": false }, "390px": { "refreshAria": "Refresh", "logoutAria": "Logout", "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false, "headerHasOverflow": false }, "adversarialLongTable320": { "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false, "headerHasOverflow": false }, "localizedSpanish390": { "refreshAria": "Actualizar", "logoutAria": "Cerrar sesión", "refreshBox": "44x44", "logoutBox": "44x44", "docHasOverflow": false }, "actions": { "refreshTablesStatus": 200, "loggedOutSignInVisible": true } }

{
  "viewports": {
    "320": {
      "refreshAria": "Refresh",
      "logoutAria": "Logout",
      "refreshBox": {
        "x": 208,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "logoutBox": {
        "x": 264,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "docScrollWidth": 320,
      "innerWidth": 320,
      "docHasOverflow": false,
      "headerScrollWidth": 320,
      "headerClientWidth": 320,
      "headerHasOverflow": false
    },
    "375": {
      "refreshAria": "Refresh",
      "logoutAria": "Logout",
      "refreshBox": {
        "x": 263,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "logoutBox": {
        "x": 319,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "docScrollWidth": 375,
      "innerWidth": 375,
      "docHasOverflow": false,
      "headerScrollWidth": 375,
      "headerClientWidth": 375,
      "headerHasOverflow": false
    },
    "390": {
      "refreshAria": "Refresh",
      "logoutAria": "Logout",
      "refreshBox": {
        "x": 278,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "logoutBox": {
        "x": 334,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "docScrollWidth": 390,
      "innerWidth": 390,
      "docHasOverflow": false,
      "headerScrollWidth": 390,
      "headerClientWidth": 390,
      "headerHasOverflow": false
    },
    "430": {
      "refreshAria": "Refresh",
      "logoutAria": "Logout",
      "refreshBox": {
        "x": 318,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "logoutBox": {
        "x": 374,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "docScrollWidth": 430,
      "innerWidth": 430,
      "docHasOverflow": false,
      "headerScrollWidth": 430,
      "headerClientWidth": 430,
      "headerHasOverflow": false
    },
    "768": {
      "refreshAria": "Refresh",
      "logoutAria": "Logout",
      "refreshBox": {
        "x": 656,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "logoutBox": {
        "x": 712,
        "y": 8,
        "width": 44,
        "height": 44
      },
      "docScrollWidth": 768,
      "innerWidth": 768,
      "docHasOverflow": false,
      "headerScrollWidth": 768,
      "headerClientWidth": 768,
      "headerHasOverflow": false
    }
  },
  "adversarialLongTable320": {
    "refreshBox": {
      "x": 208,
      "y": 8,
      "width": 44,
      "height": 44
    },
    "logoutBox": {
      "x": 264,
      "y": 8,
      "width": 44,
      "height": 44
    },
    "subtitleText": "Table Grand-Terrace-Banquet-Table-999-Extra-Long-Identifier-Overflow-Guard",
    "docScrollWidth": 320,
    "innerWidth": 320,
    "docHasOverflow": false,
    "headerScrollWidth": 320,
    "headerClientWidth": 320,
    "headerHasOverflow": false
  },
  "localizedSpanish390": {
    "buttons": [
      {
        "ariaLabel": "Actualizar",
        "rect": {
          "x": 278,
          "y": 8,
          "width": 44,
          "height": 44,
          "top": 8,
          "right": 322,
          "bottom": 52,
          "left": 278
        }
      },
      {
        "ariaLabel": "Cerrar sesión",
        "rect": {
          "x": 334,
          "y": 8,
          "width": 44,
          "height": 44,
          "top": 8,
          "right": 378,
          "bottom": 52,
          "left": 334
        }
      }
    ],
    "docHasOverflow": false
  },
  "actions": {
    "refreshTablesStatus": 200,
    "loggedOutSignInVisible": true
  }
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 4 of 4 scenarios driven live against the product
Scenario Result Live Evidence
A server user opens the Server App across mobile viewports (320px, 375px, 390px, 430px, 768px) and inspects the header action buttons; both the Refresh and Logout buttons expose accessible names ('Ref… ✅ pass live cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.ts and `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…
A server user opens the Server App at 320px and 390px widths, including with an adversarial extra-long table name selected in the header subtitle; the subtitle truncates cleanly, neither the document… ✅ pass live ~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-320px.png, `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-header-390px.pn…
A server user switches the Server App language to Spanish ('es'); the Refresh and Logout header buttons expose localized aria-label attributes ('Actualizar' and 'Cerrar sesión') from the reused settin… ✅ pass live ~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server-app-issue-1088-verification.json and npm run test:translations
A server user clicks the 44x44px Refresh header button at 390px width to reload tables from GET /api/tables, then clicks the 44x44px Logout header button and is returned to the Sign In screen ✅ pass live cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.ts and `~/.no-mistakes/evidence/01M4VTVDNVTQA2CFSBGRZ1JDGS/server…
  • npm run build && npm run build:frontend
  • cd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/server-app-ordering.spec.ts
  • npm run test:translations
  • npm run test:rtl-kds-server-whatsapp
  • Live Playwright verification against tests/e2e-server.cjs capturing screenshots and bounding-box/overflow measurements at 320px, 375px, 390px, 430px, and 768px (English, Spanish locale, and adversarial long table name)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50c87b59-afdc-4742-bba8-9d5b3f498870

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@khaira777 khaira777 changed the title fix(frontend): size Server App header action buttons to 44x44px minimum fix(server-app): ensure 44px header button size Oct 13, 2026
@khaira777

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR gives both Server App header buttons a minimum 44×44px touch target.

  • Refresh and Logout buttons now have 44-pixel minimum touch areas.

Reviews (1) · Last reviewed commit: "fix(server-app): size header buttons to ..." · Reviewed by Greptile

@khaira777

Copy link
Copy Markdown
Contributor Author

The 44×44px touch-target fix looks good. The CSS change is minimal, and the reported mobile viewport checks support the implementation.

I found one additional accessibility issue in frontend/src/app/server-standalone/page.tsx: the Refresh and Logout buttons still contain only SVG icons without accessible names.

Before merging, please:

  1. Add localized aria-label attributes identifying the Refresh and Logout actions.
  2. Reuse existing translation keys where appropriate.
  3. Extend the browser test to verify that both buttons have the correct accessible names, in addition to their minimum 44×44px dimensions.
  4. Confirm that both actions still work and the header has no horizontal overflow at 320px and 390px widths.
  5. Run the relevant tests and confirm they pass.

Keep the existing sizing fix. No unrelated styling or refactoring.

@khaira777
khaira777 force-pushed the fm/flocafe-issue-1088-r1 branch from 6d524b0 to 8d8e843 Compare October 14, 2026 00:03
@khaira777 khaira777 changed the title fix(server-app): ensure 44px header button size fix(frontend): size Server App header action buttons to 44x44px Oct 14, 2026
@khaira777 khaira777 changed the title fix(frontend): size Server App header action buttons to 44x44px fix(server-app): size header buttons to 44x44px Oct 14, 2026
@khaira777 khaira777 changed the title fix(server-app): size header buttons to 44x44px fix(server): make header responsive on mobile Oct 14, 2026
Ensure the Server App header Refresh and Logout buttons meet the 44x44px minimum touch target on mobile viewports without horizontal overflow.

Fixes #1088
Add localized aria-label attributes to the Server App Refresh and Logout header buttons and extend the E2E suite to verify accessible names, 44x44px bounds, no horizontal overflow, and button actions.

Fixes #1088
@khaira777
khaira777 force-pushed the fm/flocafe-issue-1088-r1 branch from 8d8e843 to 9c16b38 Compare October 14, 2026 01:35
@khaira777
khaira777 enabled auto-merge (squash) October 14, 2026 01:35
@khaira777
khaira777 merged commit 01d1c48 into main Oct 14, 2026
23 checks passed
@khaira777
khaira777 deleted the fm/flocafe-issue-1088-r1 branch October 14, 2026 01:41
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.

fix(a11y): enlarge Server App mobile action buttons to 44x44px minimum touch target size

1 participant