Skip to content

OUT-4156: disable settings section for non-US QBO portals - #285

Open
SandipBajracharya wants to merge 1 commit into
masterfrom
OUT-4156
Open

OUT-4156: disable settings section for non-US QBO portals#285
SandipBajracharya wants to merge 1 commit into
masterfrom
OUT-4156

Conversation

@SandipBajracharya

Copy link
Copy Markdown
Collaborator

What & why

OUT-4156

When an IU connects to a non-US QBO account the integration can't sync, so the app already shows an error callout and disables the "Enable app" button. But the settings section stayed fully interactive — IUs could still expand accordions and edit/save service, account, and invoice mappings that would never take effect.

This disables the whole settings section for non-US portals.

Approach

  • Added a single derived flag settingsDisabled = !portalConnectionStatus || nonUsCompanyChecking || nonUsCompany, extending the existing disconnected-state gate to also cover non-US portals and the in-flight country check.
  • Reused the existing disconnected-state overlay pattern (opacity-25 + a full-cover z-10 click-capture div) rather than threading a disabled prop through SettingAccordionAccordion → three sub-sections (DRY).
  • Added inert on the wrapper so keyboard / screen-reader users are blocked too, not just the mouse. Applied via a conditional spread ({...(settingsDisabled ? { inert: true } : {})}) so the attribute is fully absent when enabled.

Behaviour

  • Non-US portal → settings greyed and non-interactive (accordion won't open); pointer + keyboard both blocked.
  • While the country check runs → disabled (no flash of editable settings).
  • Check fails (transient QBO/token blip)fails open — the existing catch leaves nonUsCompany falsy, so majority US portals are never locked out of their settings.
  • Disconnect stays reachable — it lives in the top-level header actions menu (via useAppBridge), outside this block.

Notes

  • Reviewed by fullstack-code-reviewer: no correctness issues; the inert addition closes the a11y gap it flagged.
  • @types/react is v19 (types expect inert: boolean) while runtime is React 18; the conditional-spread form is correct for both.
  • Scope: one file, src/components/dashboard/Main.tsx. No test exists for this component; happy to add one if desired.

🤖 Generated with Claude Code

Non-US QBO portals cannot sync, but the settings section stayed
interactive. Reuse the disconnected-state overlay (opacity + click
capture) and add `inert` so pointer and keyboard/AT users alike are
blocked while connected to a non-US account or during the country check.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@linear-code

Copy link
Copy Markdown

OUT-4156

@vercel

vercelBot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated
quickbooks-syncBuildingBuildingSep 4, 2026 11:24am UTC
quickbooks-sync (dev)ReadyReadyPreviewSep 4, 2026 11:24am UTC

Request Review

@greptile-apps

Copy link
Copy Markdown

Greptile Summary

This PR disables the dashboard settings surface while disconnected, while the QuickBooks company-country check is running, or when a non-US company is detected.

  • Adds a shared settingsDisabled state derived from connection and country-check status.
  • Applies the existing dimming and pointer overlay to all disabled states.
  • Adds conditional inert behavior to prevent keyboard and assistive-technology interaction.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable issue identified.

The settings wrapper remains mounted while disabled, preserves local drafts, and consistently applies the expanded connection and country-state interaction guard.

Important Files Changed

FilenameOverview
src/components/dashboard/Main.tsxExtends the existing disconnected-state settings guard to cover country checking and unsupported non-US QuickBooks companies, with no publishable defect established.

Reviews (1): Last reviewed commit: "fix(OUT-4156): disable settings section ..." | Re-trigger Greptile

@SandipBajracharyaSandipBajracharya changed the title fix(OUT-4156): disable settings section for non-US QBO portalsOUT-4156: disable settings section for non-US QBO portalsSep 4, 2026

@priosshrsthpriosshrsth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for freeto 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

@SandipBajracharya@priosshrsth