Skip to content

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Jan 19, 2026

Closes FRONT-917

TL;DR

Fixed navigation issues in context switcher and improved UI components for better user experience.

What changed?

  • Fixed context switcher navigation by calling onClose() before navigation to prevent UI glitches
  • Added a "Need help?" button with a help dropdown to the actor unavailable screen
  • Improved error details accordion styling with proper padding
  • Enhanced popover animation by adding fill-mode-forwards to prevent flickering during transitions
  • Removed unused Rivet type import from actor-status-label

How to test?

  1. Test the context switcher by creating new projects and namespaces - verify the dropdown closes properly before navigation
  2. Check the actor unavailable screen to ensure the help button appears and functions correctly
  3. Verify error details accordion displays properly with correct padding
  4. Test popovers throughout the application to ensure smooth animations without flickering

Why make this change?

These changes address several UI/UX issues:

  • The context switcher was not properly closing before navigation, causing visual glitches
  • Users needed more guidance when encountering unavailable actors
  • Error details display needed better spacing for readability
  • Popover animations were flickering during transitions due to missing animation properties

@railway-app
Copy link

railway-app bot commented Jan 19, 2026

🚅 Deployed to the rivet-pr-3980 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud ✅ Success (View Logs) Web Jan 20, 2026 at 7:20 pm
frontend-inspector ✅ Success (View Logs) Web Jan 20, 2026 at 7:19 pm
website 😴 Sleeping (View Logs) Web Jan 20, 2026 at 7:01 pm

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-3980 January 19, 2026 22:46 Destroyed
Copy link
Contributor Author

jog1t commented Jan 19, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Jan 19, 2026

Pull Request Review

Summary

This PR fixes navigation issues in the context switcher and improves UI components for the actor unavailable screen. Overall, the changes are solid and address real UX issues, but there are a few areas that need attention.


Issues Found

🔴 Critical: Type Safety Issue in types.ts

File: frontend/src/queries/types.ts:30-37

The RivetActorError type definition has a problem:

export type RivetActorError = 
    | string
    | null
    | object  // ❌ This is too broad
    | { runner_id: string }
    | { serverless_http_error: unknown }
    | { serverless_connection_error: unknown }
    | { serverless_invalid_sse_payload: unknown };

Problem: The | object union member makes the entire type effectively any because all the specific object types ({ runner_id: string }, etc.) are subsets of object. This defeats the purpose of having a discriminated union.

Recommendation: Remove | object from the union. If there are other error shapes that need to be handled, define them explicitly. For example:

export type RivetActorError = 
    | string
    | null
    | { runner_id: string }
    | { serverless_http_error: unknown }
    | { serverless_connection_error: unknown }
    | { serverless_invalid_sse_payload: unknown }
    | Record<string, unknown>; // Only if you truly need a catch-all

🟡 Code Style: Formatting Issues

File: frontend/src/queries/types.ts:30

  • There are extra blank lines before the type definition (line 29)
  • Missing newline at end of file (line 37)

These should be cleaned up for consistency with the rest of the codebase.

File: frontend/src/components/ui/popover.tsx:22

There's a double space in the className:

className={cn(
    "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none  data-[state=open]:animate-in ...
                                                                                                    // ^^ extra space here

Positive Observations

✅ Navigation Fix

The context switcher fix is well thought out - calling onClose?.() before navigation prevents UI glitches by ensuring the dropdown closes before the route changes. The consistent pattern across all navigation points is good.

✅ UX Improvement

Adding the "Need help?" button to the actor unavailable screen is a great UX enhancement that provides users with guidance when they encounter errors.

✅ Animation Improvement

The fill-mode-forwards addition to the popover animation is a good catch that prevents flickering during transitions.

✅ Type Centralization

Moving the error type to a centralized location (types.ts) is a good refactoring that improves maintainability, though the type itself needs refinement (see issue above).

✅ Cleanup

Removing unused imports in actor-status-label.tsx is good housekeeping.


Recommendations

  1. Fix the type safety issue in RivetActorError by removing | object
  2. Clean up formatting issues (extra blank lines, missing newline at EOF)
  3. Fix double space in popover.tsx className
  4. Consider adding tests for the navigation flow to ensure onClose is called before navigation in all cases

Testing Notes

Please verify:

  • The context switcher properly closes before navigation in all scenarios
  • The help dropdown appears correctly on the actor unavailable screen
  • Popover animations are smooth without flickering
  • Type checking still passes after removing | object from RivetActorError

Verdict

Approve with changes requested. The core functionality is solid, but the type safety issue should be fixed before merging.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@3980

@rivetkit/db

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/db@3980

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@3980

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@3980

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@3980

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@3980

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@3980

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@3980

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@3980

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@3980

commit: a1d74b9

@linear
Copy link

linear bot commented Jan 19, 2026

@jog1t jog1t marked this pull request as ready for review January 20, 2026 18:52
@jog1t jog1t force-pushed the 01-19-fix_dashboard_resource_not_found_when_navigating_to_settings_on_projects_page branch from 8aa0f90 to 470992d Compare January 20, 2026 18:53
@jog1t jog1t force-pushed the 01-19-fix_dashboard_display_support_dropdown_on_actor_error branch from d96ece2 to 213eb7b Compare January 20, 2026 18:53
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-3980 January 20, 2026 18:53 Destroyed
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 20, 2026

Graphite Automations

"Test" took an action on this PR • (01/20/26)

1 assignee was added to this PR based on Kacper Wojciechowski's automation.

@jog1t jog1t force-pushed the 01-19-fix_dashboard_display_support_dropdown_on_actor_error branch from 213eb7b to a1d74b9 Compare January 20, 2026 19:17
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-3980 January 20, 2026 19:17 Destroyed
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 20, 2026

Merge activity

  • Jan 20, 7:20 PM UTC: jog1t added this pull request to the Graphite merge queue.
  • Jan 20, 7:21 PM UTC: CI is running for this pull request on a draft pull request (#3984) due to your merge queue CI optimization settings.
  • Jan 20, 7:21 PM UTC: Merged by the Graphite merge queue via draft PR: #3984.

Comment on lines +30 to +37
export type RivetActorError =
| string
| null
| object
| { runner_id: string }
| { serverless_http_error: unknown }
| { serverless_connection_error: unknown }
| { serverless_invalid_sse_payload: unknown };
Copy link
Contributor

Choose a reason for hiding this comment

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

The RivetActorError type definition has formatting issues. Fix by ensuring consistent spacing around the pipe (|) operators and adding a newline at the end of the file. Also, the 'object' type is too generic - it should be more specific or removed if redundant with the other object types listed.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines 1 to 17
import { useQuery } from "@tanstack/react-query";
import { formatISO } from "date-fns";
import { isObject } from "lodash";
import { match, P } from "ts-pattern";
import { CodePreview } from "../code-preview/code-preview";
import { RelativeTime } from "../relative-time";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "../ui/accordion";
import { ScrollArea } from "../ui/scroll-area";
import { Code } from "../ui/typography";
import { useDataProvider } from "./data-provider";
import type { ActorId, ActorStatus } from "./queries";
import { RivetActorError } from "@/queries/types";
Copy link
Contributor

Choose a reason for hiding this comment

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

The imports appear to be unsorted or improperly organized. The removal of the Rivet import and addition of RivetActorError import may need to be properly sorted according to the project's import ordering rules.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

graphite-app bot pushed a commit that referenced this pull request Jan 20, 2026
Closes FRONT-917

### TL;DR

Fixed navigation issues in context switcher and improved UI components for better user experience.

### What changed?

- Fixed context switcher navigation by calling `onClose()` before navigation to prevent UI glitches
- Added a "Need help?" button with a help dropdown to the actor unavailable screen
- Improved error details accordion styling with proper padding
- Enhanced popover animation by adding `fill-mode-forwards` to prevent flickering during transitions
- Removed unused Rivet type import from actor-status-label

### How to test?

1. Test the context switcher by creating new projects and namespaces - verify the dropdown closes properly before navigation
2. Check the actor unavailable screen to ensure the help button appears and functions correctly
3. Verify error details accordion displays properly with correct padding
4. Test popovers throughout the application to ensure smooth animations without flickering

### Why make this change?

These changes address several UI/UX issues:

- The context switcher was not properly closing before navigation, causing visual glitches
- Users needed more guidance when encountering unavailable actors
- Error details display needed better spacing for readability
- Popover animations were flickering during transitions due to missing animation properties
@graphite-app graphite-app bot closed this Jan 20, 2026
@graphite-app graphite-app bot deleted the 01-19-fix_dashboard_display_support_dropdown_on_actor_error branch January 20, 2026 19:21
Comment on lines +291 to +292
onClose?.();
return navigate({
Copy link
Contributor

Choose a reason for hiding this comment

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

This creates a floating promise. Either remove the 'return' keyword or use 'void' operator: onClose?.(); void navigate({...});

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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.

2 participants