Skip to content

Show tab-aware loading state for Seat Analysis and User Metrics - #457

Draft
karpikpl with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-blank-screen-on-tab-switch
Draft

Show tab-aware loading state for Seat Analysis and User Metrics#457
karpikpl with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-blank-screen-on-tab-switch

Conversation

Copilot AI commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

The dashboard only showed a loading indicator for metricsReady (default tab path), so switching early to Seat analysis or User metrics could render an empty panel with no feedback. This change makes loading feedback follow the active tab’s own readiness state.

  • Loading state logic (centralized)

    • Added shouldShowActiveTabLoading(...) in app/utils/tabUtils.ts.
    • Logic now maps loading visibility to the active tab:
      • seat analysis!seatsReady
      • user metrics!userMetricsReady
      • all other tabs → !metricsReady
    • Keeps auth-gated behavior (signInRequired) unchanged.
  • Main component wiring

    • Updated app/components/MainComponent.vue to use computed showActiveTabLoading for the shared <v-progress-linear>.
    • Replaced the prior hardcoded !metricsReady && !signInRequired condition.
  • Regression coverage

    • Added tests/tabUtils.loading.spec.ts to lock behavior for:
      • seat-analysis loading state
      • user-metrics loading state
      • ready-state suppression
      • sign-in-required suppression
export function shouldShowActiveTabLoading(state: ActiveTabLoadingState): boolean {
  if (state.signInRequired) return false
  if (state.tab === 'seat analysis') return !state.seatsReady
  if (state.tab === 'user metrics') return !state.userMetricsReady
  return !state.metricsReady
}

Co-authored-by: karpikpl <3539908+karpikpl@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix blank screen on tab switch without loading feedback Show tab-aware loading state for Seat Analysis and User Metrics Aug 12, 2026
Copilot AI requested a review from karpikpl August 12, 2026 03:20
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.

Switching to Seat Analysis / User Metrics tab before its data loads shows a blank screen — no loading feedback

2 participants