Skip to content

fix(frontend): ts issues#4694

Merged
jog1t merged 1 commit intomainfrom
04-22-fix_frontend_ts_issues
Apr 22, 2026
Merged

fix(frontend): ts issues#4694
jog1t merged 1 commit intomainfrom
04-22-fix_frontend_ts_issues

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented Apr 22, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
Contributor Author

jog1t commented Apr 22, 2026

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

@jog1t jog1t marked this pull request as ready for review April 22, 2026 17:21
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Apr 22, 2026

PR Review: fix(frontend): ts issues

Summary: This PR fixes TypeScript compilation errors in the frontend by migrating the log streaming system from RivetSse.streamLogs SDK calls to a direct fetch-based SSE implementation, removing dead "Rivet compute" provider code, and adding a from redirect parameter to the login flow.


HIGH Priority

1. Silent API failure when DeploymentLogs is used without project/namespace

frontend/src/components/actors/actors-actor-details.tsx:495

project and namespace are now optional in DeploymentLogsProps, but useDeploymentLogsStream passes them as project ?? "" and namespace ?? "" to streamWithRetry, which builds a URL like /projects//namespaces//managed-pools/default/logs. In a non-cloud deployment, cloudEnv() will throw a Zod parse error because VITE_APP_CLOUD_API_URL is not set.

useManagedPool() is currently hard-coded to return false (line 117) so the tab is hidden for now, but once that guard is re-enabled this will break. Either make project/namespace required, or add an early short-circuit in the hook when they are empty/undefined.


MEDIUM Priority

2. Stub return values leave dead scroll UI in deployment-logs.tsx

frontend/src/components/use-deployment-logs-stream.ts:264-272

streamError, isLoadingMore, hasMore, and loadMoreHistory are all stubbed as no-ops, but DeploymentLogs still has full UI logic for them (scroll-sentinel, history loading). There is no comment explaining this is intentional. Either add a comment (// history API removed; infinite scroll not supported) or clean up the dead UI branches in deployment-logs.tsx.

3. hub.rivet.gg domain in modified file

frontend/src/routes/login.tsx:41,46 (pre-existing, but this PR modifies the file):

Per CLAUDE.md: ALWAYS use rivet.dev - NEVER use rivet.gg. The hub.rivet.gg references should be updated to hub.rivet.dev.


LOW Priority

4. Redundant type guard and cast in login.tsx

frontend/src/routes/login.tsx:25: validateSearch declares from: z.string().optional(), so search.from is already string | undefined. The "from" in search guard and as string cast are unnecessary.

5. Always-false dead branch in getting-started.tsx

frontend/src/app/getting-started.tsx:996: if (false) is permanently dead. The entire block (including RivetCopyAgentInstructionsButton) should be removed rather than guarded by literal false.

6. Formatting in login.tsx

frontend/src/routes/login.tsx:11-12: The validateSearch object definition mixes inline and multiline style with inconsistent indentation.

7. Minor nits in use-deployment-logs-stream.ts

Double blank line around line 122-124 (left after moving sleep). loadMoreHistory: () => { } spacing is inconsistent with typical style.


Positive Changes

  • connect-quick-railway-frame.tsx: Removing unused canvas-confetti import is clean.
  • actor-builds-list.tsx: Removing unused use import and replacing with ReactNode type is correct.
  • deployment-logs.tsx: Migrating to RivetSse.LogStreamEvent.Log and aligning field access (entry.data.severity, entry.data.message, entry.data.timestamp) is correct.
  • cloud-data-provider.tsx: Removing logsHistoryInfiniteQueryOptions is correct cleanup.
  • actor-database.tsx: Widening handleRunRef type to Promise<void> | void is the right fix.
  • _context.tsx: Adding from: z.string().optional() to the route search schema is necessary for the login redirect round-trip.
  • getting-started.tsx: Import reordering and removing dead filteredOptions/badge UI is clean.

Priority Location Issue
HIGH actors-actor-details.tsx:495 Empty project/namespace causes malformed URL or cloudEnv() throw when tab re-enabled
MEDIUM use-deployment-logs-stream.ts:264-272 Stub return values leave unexplained dead scroll UI
MEDIUM login.tsx:41,46 hub.rivet.gg should be hub.rivet.dev (CLAUDE.md convention)
LOW login.tsx:25 Redundant type guard + unnecessary as string cast
LOW getting-started.tsx:996 Always-false if (false) dead branch
LOW login.tsx:11-12 Inconsistent validateSearch formatting
LOW use-deployment-logs-stream.ts Minor style nits

Copy link
Copy Markdown
Contributor Author

jog1t commented Apr 22, 2026

Merge activity

  • Apr 22, 5:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 22, 5:33 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 22, 5:34 PM UTC: @jog1t merged this pull request with Graphite.

@jog1t jog1t changed the base branch from 04-22-fix_frontend_organization_slug_shenanigans to graphite-base/4694 April 22, 2026 17:31
@jog1t jog1t changed the base branch from graphite-base/4694 to main April 22, 2026 17:31
@jog1t jog1t force-pushed the 04-22-fix_frontend_ts_issues branch from aaf5e68 to 8f90cd9 Compare April 22, 2026 17:33
@jog1t jog1t merged commit e03d194 into main Apr 22, 2026
22 of 25 checks passed
@jog1t jog1t deleted the 04-22-fix_frontend_ts_issues branch April 22, 2026 17:34
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