Skip to content

fix(studio): repair 4 misleading/empty UI states (P1)#157

Merged
Pama-Lee merged 3 commits into
mainfrom
fix/studio-p1-states
Jul 9, 2026
Merged

fix(studio): repair 4 misleading/empty UI states (P1)#157
Pama-Lee merged 3 commits into
mainfrom
fix/studio-p1-states

Conversation

@Pama-Lee

@Pama-Lee Pama-Lee commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Second batch of Studio fixes — the P1 "misleading / empty state" items from the audit. Frontend-only, no runtime changes.

Stacked on #156 (P0 data-loss/auth). Base points at fix/studio-p0-dataloss-auth so the diff here is P1-only; GitHub retargets this PR to main automatically once #156 merges. Merge #156 first.

#4 — Analytics load failure masqueraded as "no traffic"

The store captured error but the view never read it, so a 500 / network / permission error rendered the same "No execution data yet" card as a genuinely idle project. Added a distinct error state (message + retry) ahead of the empty branch.

#5 — Notification bell: badge counts what the dropdown couldn't show

The badge summed persistent notifications (release reviews/approvals, polled as a count) plus transient session toasts, but the dropdown only listed the toasts. Result: a real release-review notification lit a red "1" that opened to "No notifications". The dropdown now fetches the server-backed list on open and merges both (sorted by time); clicking a release item jumps to the project's releases and marks it read; "mark all read" clears both stores.

#6 — Notifications inbox: deep-link blindness + swallowed errors

Read the org from the URL (route.params.orgId) instead of only the current-org store, so a deep link / hard reload loads the right inbox. The persistent-notifications store now propagates fetch errors (it previously swallowed them), and the inbox renders an error state with retry instead of an empty list on failure.

#7 — Dead "Forgot password?" link on the login page

Pointed at /forgot-password, which has no route — clicking it just reloaded login. Removed the link and its now-unused styles.

Verification

  • vue-tsc --noEmit clean; full vite build clean.
  • New i18n keys (analytics.errorTitle, notifications.error, notifications.retry) added to all three locales (parity kept).

Remaining P2 polish (fake SSO buttons, silent empty-field login, orphan RuleTraceView, tab-bar overflow <1100px, fetchMe swallowing boot errors) tracked for a later batch.

Pama-Lee added 2 commits July 6, 2026 23:47
- 401 on the hand-rolled fetches (draft save, AI chat stream, server
  metrics) bypassed the global unauthorized handler, so an expired token
  during a save just surfaced "HTTP 401" and left the session stuck.
  Route all fetch paths through a shared noteUnauthorized() so any 401 on
  an authenticated call bounces to login with a redirect back.

- Switching projects kept the previous project's open tabs, so a save
  wrote project A's ruleset into project B (silent cross-project
  corruption) and the editor's auto-open never fired. selectProject now
  resets the per-project tab/draft state on a project change, and the
  project picker warns before discarding unsaved edits.

- Deep links, bookmarks, and hard reloads ignored the URL's org/project
  and loaded the last-saved workspace instead (wrong sidebar, blank
  editor). A router guard now hydrates the org/project stores from the
  URL before the target view mounts.
- Analytics: a failed load rendered as "No execution data yet", identical
  to a genuinely idle project. Add a distinct error state (message +
  retry) that reads the store's error instead of falling through to the
  empty card.

- Notification bell: the badge counted server-backed notifications
  (release reviews/approvals) plus session toasts, but the dropdown only
  listed the toasts — so a real notification lit the badge yet opened to
  "no notifications". The dropdown now fetches and merges both lists on
  open, and "mark all read" clears both.

- Notifications inbox: read the org from the URL (not just the current
  store) so a deep link loads the right inbox, and surface load failures
  as an error state with retry instead of a swallowed empty list. The
  persistent-notifications store now propagates fetch errors.

- Login: remove the dead "Forgot password?" link (no such route existed;
  it just reloaded the login page) and its now-unused styles.
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ordo_docs Ready Ready Preview, Comment Jul 9, 2026 12:59pm

@Pama-Lee
Pama-Lee changed the base branch from fix/studio-p0-dataloss-auth to main July 9, 2026 10:51
@Pama-Lee
Pama-Lee merged commit 3c7d182 into main Jul 9, 2026
14 of 15 checks passed
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.

1 participant