Skip to content

Conversation

jog1t
Copy link
Contributor

@jog1t jog1t commented Apr 14, 2025

Changes

Copy link

cloudflare-workers-and-pages bot commented Apr 14, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: a8959bc
Status: ✅  Deploy successful!
Preview URL: https://998ec78c.rivet-hub-7jb.pages.dev
Branch Preview URL: https://04-15-feat-hub-functions.rivet-hub-7jb.pages.dev

View logs

Copy link
Contributor Author

jog1t commented Apr 14, 2025

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.

Copy link

cloudflare-workers-and-pages bot commented Apr 14, 2025

Deploying rivet-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7de6870
Status:⚡️  Build in progress...

View logs

Copy link

cloudflare-workers-and-pages bot commented Apr 14, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: a8959bc
Status: ✅  Deploy successful!
Preview URL: https://bb87a6e5.rivet.pages.dev
Branch Preview URL: https://04-15-feat-hub-functions.rivet.pages.dev

View logs

@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch from 6b80b50 to 6973c98 Compare April 16, 2025 21:48
@jog1t jog1t changed the base branch from main to graphite-base/2364 April 16, 2025 21:49
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch from 6973c98 to 6d6eeb8 Compare April 16, 2025 21:50
@jog1t jog1t changed the base branch from graphite-base/2364 to 04-15-feat_routes April 16, 2025 21:50
@NathanFlurry NathanFlurry mentioned this pull request Apr 16, 2025
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch from 6d6eeb8 to d569321 Compare April 17, 2025 00:56
@NathanFlurry NathanFlurry marked this pull request as ready for review April 17, 2025 02:06
Copy link
Contributor

graphite-app bot commented Apr 17, 2025

Graphite Automations

"Test" took an action on this PR • (04/17/25)

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

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR introduces a comprehensive functions view and route management system to the Rivet hub application, with significant UI and architectural improvements.

  • Added new functions view in /frontend/apps/hub/src/routes/_authenticated/_layout/projects/$projectNameId/environments/$environmentNameId._v2/functions.tsx with virtualized table for efficient rendering of function invocations
  • Implemented route management dialogs in /frontend/apps/hub/src/domains/project/components/dialogs/create-route-dialog.tsx and edit-route-dialog.tsx with form validation
  • Added new v2 layout system across multiple components with collapsible sidebar and improved error handling
  • Added table utilities in /frontend/packages/components/src/lib/table.ts for flexible column sizing and virtualization support
  • Introduced route mutations (patch, create, delete) in /frontend/apps/hub/src/domains/project/queries/actors/mutations.ts with proper query invalidation

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

27 file(s) reviewed, 34 comment(s)
Edit PR Review Bot Settings | Greptile

import {
useMatches,
useMatchRoute,
useRouterState,
Copy link

Choose a reason for hiding this comment

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

style: useRouterState is imported but never used in the code

Suggested change
useRouterState,
useMatches,
useMatchRoute,

Comment on lines 32 to +34
"px-8 w-full h-full":
layout === "full" || layout === "actors",
"px-4 w-full h-full": layout === "v2",
Copy link

Choose a reason for hiding this comment

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

logic: 'onboarding' layout is missing from this condition but present in main PageLayout component

Comment on lines 27 to 32
"h-full":
layout === "full" ||
layout === "onboarding" ||
layout === "actors",
layout === "actors" ||
layout === "v2",
})}
Copy link

Choose a reason for hiding this comment

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

style: Consider extracting layout conditions into a separate utility function to improve maintainability as more layouts are added

Comment on lines +70 to +71
let calculatedSize = 100;
calculatedSize = Math.floor(totalAvailableWidth / totalIsGrow);
Copy link

Choose a reason for hiding this comment

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

style: Unnecessary initialization of calculatedSize to 100 since it's immediately overwritten on the next line

Suggested change
let calculatedSize = 100;
calculatedSize = Math.floor(totalAvailableWidth / totalIsGrow);
const calculatedSize = Math.floor(totalAvailableWidth / totalIsGrow);

Comment on lines +36 to +54
if (!column.size) {
if (!column.meta?.isGrow) {
let calculatedSize = 100;
if (column?.meta?.widthPercentage) {
calculatedSize =
column.meta.widthPercentage * totalWidth * 0.01;
} else {
calculatedSize = totalWidth / columns.length;
}

const size = getSize(
calculatedSize,
column.maxSize,
column.minSize,
);

column.size = size;
}
}
Copy link

Choose a reason for hiding this comment

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

logic: Column size calculation should happen even if column.size exists but isGrow is true, otherwise growing columns won't resize properly when window changes

Comment on lines +31 to +32
let totalAvailableWidth = totalWidth;
let totalIsGrow = 0;
Copy link

Choose a reason for hiding this comment

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

logic: totalAvailableWidth could become negative if sum of minimum widths exceeds total width, leading to incorrect calculations

@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch 2 times, most recently from 74caf46 to dca2d32 Compare April 17, 2025 20:57
@NathanFlurry NathanFlurry changed the base branch from 04-15-feat_routes to graphite-base/2364 April 23, 2025 21:40
@jog1t jog1t force-pushed the graphite-base/2364 branch from 1f203f6 to 7e9c119 Compare April 24, 2025 16:04
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch 2 times, most recently from 7d42682 to 3c337f5 Compare April 24, 2025 16:47
@jog1t jog1t force-pushed the graphite-base/2364 branch from 7e9c119 to b08ab09 Compare April 24, 2025 16:47
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch from 3c337f5 to 544d442 Compare April 24, 2025 17:28
@jog1t jog1t changed the base branch from graphite-base/2364 to 04-15-feat_routes April 24, 2025 17:28
@NathanFlurry NathanFlurry changed the base branch from 04-15-feat_routes to graphite-base/2364 April 24, 2025 19:40
@jog1t jog1t force-pushed the graphite-base/2364 branch from b08ab09 to 9ab3977 Compare April 24, 2025 20:41
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch 2 times, most recently from 1ea1fde to 0c8f699 Compare April 24, 2025 20:42
@jog1t jog1t changed the base branch from graphite-base/2364 to 04-15-feat_routes April 24, 2025 20:42
@NathanFlurry NathanFlurry changed the base branch from 04-15-feat_routes to graphite-base/2364 April 24, 2025 20:58
@jog1t jog1t changed the title feat(hub): functions feat(hub): logs Apr 24, 2025
@jog1t jog1t force-pushed the graphite-base/2364 branch from 9ab3977 to 1d4d4f6 Compare April 24, 2025 23:44
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch 2 times, most recently from f380d1b to c429793 Compare April 24, 2025 23:55
@jog1t jog1t changed the base branch from graphite-base/2364 to 04-15-feat_routes April 24, 2025 23:55
@jog1t jog1t force-pushed the 04-15-feat_hub_functions branch 3 times, most recently from 596e93d to a8959bc Compare April 25, 2025 01:01
@NathanFlurry NathanFlurry changed the base branch from 04-15-feat_routes to graphite-base/2364 April 25, 2025 09:12
@NathanFlurry NathanFlurry force-pushed the 04-15-feat_hub_functions branch from a8959bc to 7de6870 Compare April 25, 2025 13:04
@NathanFlurry NathanFlurry changed the base branch from graphite-base/2364 to main April 25, 2025 13:04
Copy link
Contributor

graphite-app bot commented Apr 25, 2025

Merge activity

  • Apr 25, 9:04 AM EDT: NathanFlurry added this pull request to the Graphite merge queue.
  • Apr 25, 9:05 AM EDT: CI is running for this pull request on a draft pull request (#2384) due to your merge queue CI optimization settings.
  • Apr 25, 9:07 AM EDT: NathanFlurry added this pull request to the Graphite merge queue.
  • Apr 25, 9:08 AM EDT: CI is running for this pull request on a draft pull request (#2385) due to your merge queue CI optimization settings.
  • Apr 25, 9:08 AM EDT: Merged by the Graphite merge queue via draft PR: #2385.

graphite-app bot pushed a commit that referenced this pull request Apr 25, 2025
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
graphite-app bot pushed a commit that referenced this pull request Apr 25, 2025
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot closed this Apr 25, 2025
@graphite-app graphite-app bot deleted the 04-15-feat_hub_functions branch April 25, 2025 13:08
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