Skip to content

Conversation

@jog1t
Copy link
Contributor

@jog1t jog1t commented Jan 2, 2026

Closes FRONT-906

@vercel
Copy link

vercel bot commented Jan 2, 2026

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

Project Deployment Review Updated (UTC)
rivet-cloud Error Error Jan 9, 2026 9:38pm
rivet-inspector Error Error Jan 9, 2026 9:38pm
rivetkit-serverless Error Error Jan 9, 2026 9:38pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
rivet-site Ignored Ignored Preview Jan 9, 2026 9:38pm

Copy link
Contributor Author

jog1t commented Jan 2, 2026


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.

@linear
Copy link

linear bot commented Jan 2, 2026

@claude
Copy link

claude bot commented Jan 2, 2026

PR Review: feat(dashboard): show runner pool errors

Overview

This PR adds functionality to display runner pool errors in the dashboard runner config table. The implementation includes error status indicators, grouped provider configurations, and detailed error tooltips.

Positive Aspects

  1. Good use of TypeScript patterns: The use of ts-pattern for error matching (lines 264-299) provides type-safe, exhaustive error handling
  2. Proper memoization: useMemo is correctly used for the expensive grouping operation (line 158)
  3. Accessibility: Tooltips and icons provide good UX for displaying errors
  4. Code cleanup: Removed unused useNamespace function and console.log statements

Issues Found

1. Logic Bug in Error Detection (Line 196-198)

const hasAtLeastOneError = groupedConfigs.some(
    (g) => Object.keys(g.runnerPoolErrors).length > 0,
);

Problem: This checks if there are any keys in the errors object, not if there are actual errors. An error object with { dc1: undefined } would still have a key count of 1.

Fix: Should check for actual error values:

const hasAtLeastOneError = groupedConfigs.some(
    (g) => Object.values(g.runnerPoolErrors).some(err => err !== undefined)
);

2. Whitespace Typo (Line 207)

There is a tab character between providers and have in the error message string. Should be a single space.

3. Unused getModal Function (Line 423-425)

This function always returns the same string and ignores the metadata parameter. Either remove it and use the string directly, or add a comment explaining it is kept for future extensibility.

4. Potential undefined access (Line 193)

If groupedConfigs is empty (no datacenters), this will pass undefined to ProviderRow. Add a safety check before accessing groupedConfigs[0].

Code Quality Suggestions

  1. Type Safety for StatusCell (Line 302-306): The errors parameter has a union type which makes the function harder to reason about. Consider using discriminated unions or separate components.

  2. Extract Magic Numbers: Line 369-371 uses hardcoded values for truncation. Consider extracting as constants.

  3. Duplicate Code in Provider Component: Lines 442-476 have repetitive icon + text patterns. Consider a lookup map for cleaner code.

Security Considerations

No security issues identified. The code properly handles user input sanitization, no unsafe HTML rendering, and no direct DOM manipulation.

Performance Considerations

  1. Good: Memoization of grouping logic prevents unnecessary recalculations
  2. Minor concern: The useMemo dependency on value.datacenters might cause recalculation if the object reference changes even when content is the same

Test Coverage

This PR lacks test coverage for error grouping logic, error message formatting for different error types, edge cases (empty datacenters, undefined errors), and provider name extraction. Consider adding unit tests for the utility functions.

Minor Issues

  1. Line 156: isExpanded defaults to true - consider if this should be false for better initial UX
  2. Lines 322-334: The error tooltip rendering could be extracted to its own component for better readability
  3. The connect.tsx changes are mostly formatting - ensure formatter settings are consistent with the team

Summary

Priority Issues to Fix:

  1. Fix error detection logic (line 196-198)
  2. Fix whitespace typo (line 207)
  3. Add safety check for empty groupedConfigs (line 193)

Recommended Improvements:

  1. Refactor StatusCell type signature for better type safety
  2. Extract magic numbers as constants
  3. Add test coverage for new functionality
  4. Consider extracting provider configuration to a lookup map

Overall Assessment: The PR implements the requested feature well with good UX considerations. The main concerns are a logic bug in error detection and missing safety checks. Once the critical issues are addressed, this will be ready to merge.

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 2, 2026

Graphite Automations

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

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

@jog1t jog1t force-pushed the 01-02-chore_update_engine-full_sdk branch from 93bc627 to 0d44a67 Compare January 3, 2026 00:05
@jog1t jog1t force-pushed the 01-03-feat_dash_show_runner_pool_errors branch from f941b79 to 70e750a Compare January 3, 2026 00:05
@jog1t jog1t changed the base branch from 01-02-chore_update_engine-full_sdk to graphite-base/3741 January 9, 2026 00:03
@jog1t jog1t force-pushed the 01-03-feat_dash_show_runner_pool_errors branch from 70e750a to 2658d38 Compare January 9, 2026 00:04
@jog1t jog1t force-pushed the graphite-base/3741 branch from 0d44a67 to 8b32560 Compare January 9, 2026 00:04
@jog1t jog1t changed the base branch from graphite-base/3741 to main January 9, 2026 00:04
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 9, 2026

More templates

@rivetkit/cloudflare-workers

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

@rivetkit/db

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

@rivetkit/framework-base

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

@rivetkit/next-js

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

@rivetkit/react

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

rivetkit

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

@rivetkit/sql-loader

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

@rivetkit/virtual-websocket

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

@rivetkit/engine-runner

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

@rivetkit/engine-runner-protocol

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

commit: 2658d38

@jog1t jog1t changed the title feat(dash): show runner pool errors feat(dashboard): show runner pool errors Jan 9, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 9, 2026

Merge activity

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

graphite-app bot pushed a commit that referenced this pull request Jan 9, 2026
@graphite-app graphite-app bot closed this Jan 9, 2026
@graphite-app graphite-app bot deleted the 01-03-feat_dash_show_runner_pool_errors branch January 9, 2026 21:42
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.

3 participants