fix(studio): repair 4 misleading/empty UI states (P1)#157
Merged
Conversation
- 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch of Studio fixes — the P1 "misleading / empty state" items from the audit. Frontend-only, no runtime changes.
#4 — Analytics load failure masqueraded as "no traffic"
The store captured
errorbut 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 --noEmitclean; fullvite buildclean.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,
fetchMeswallowing boot errors) tracked for a later batch.