-
Notifications
You must be signed in to change notification settings - Fork 48
Feat: Add builds procedures & UI #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ben-fornefeld
merged 37 commits into
main
from
implement-builds-trpc-procedures-eng-3319
Nov 27, 2025
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
e91bb46
initial: trpc builds router
ben-fornefeld 99516e7
test: procedures
ben-fornefeld 4eddb56
implement: builds header and table + refactor: procedures
ben-fornefeld 277a1c4
implement: server/client side filtering
ben-fornefeld 391bfba
improve: status message styling
ben-fornefeld c87775e
finalize: ui
ben-fornefeld 9c9491b
chore
ben-fornefeld 0c0e602
fix: table cell sizing:
ben-fornefeld 5d78425
chore'
ben-fornefeld 33c97b8
improve: repository cleanup + add: builds status pulsing
ben-fornefeld c58e1d3
Merge branch 'main' into implement-builds-trpc-procedures-eng-3319
ben-fornefeld 4d85892
improve: live template building
ben-fornefeld 8d1ab6a
finalize
ben-fornefeld 7774ed7
ui nits
ben-fornefeld 526ef04
improve: id and reason cell + overflow-x-hidden
ben-fornefeld c3cda23
ui
ben-fornefeld d0d7fb7
cleanup
ben-fornefeld 7f22209
refactor: build list fetching strategy
ben-fornefeld 65a4cb2
remove: templates prefetch
ben-fornefeld ea56d5c
finalize
ben-fornefeld bf45859
Merge branch 'main' into implement-builds-trpc-procedures-eng-3319
ben-fornefeld df348d1
test: no query hydration
ben-fornefeld f4d94e8
remove: latest build check, build.list refetch instead
ben-fornefeld 9305e2b
improve: ui/ux
ben-fornefeld 76f9879
change loading layout to slash loader
ben-fornefeld b4a2a90
improve: maxPages stored in query + previous cursor
ben-fornefeld d4b2b84
improve: pagination
ben-fornefeld 109414c
wip
ben-fornefeld 443bf32
remove: virtualization
ben-fornefeld a86235d
wip: pagination cursor fix
ben-fornefeld 1241515
remove: bidirectional cursors to avoid stale data
ben-fornefeld b84944e
fix query limit
ben-fornefeld 1a71773
chore: repo cleanup
ben-fornefeld 8955d1f
fix: back to top
ben-fornefeld cc3a7ff
clean-up: repository
ben-fornefeld ec0190f
finalize: ui nits
ben-fornefeld 5b96dd9
Remove teams router and simplify build queries
ben-fornefeld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| /** | ||
| * This test builds a basic sandbox template using the E2B SDK, | ||
| * useful for development and testing of template building features in the dashboard. | ||
| */ | ||
|
|
||
| import { Template } from 'e2b' | ||
| import { describe, expect, it } from 'vitest' | ||
|
|
||
| const l = console | ||
|
|
||
| const { TEST_E2B_DOMAIN, TEST_E2B_API_KEY } = import.meta.env | ||
|
|
||
| if (!TEST_E2B_DOMAIN || !TEST_E2B_API_KEY) { | ||
| throw new Error( | ||
| 'Missing environment variables: TEST_E2B_DOMAIN and/or TEST_E2B_API_KEY' | ||
| ) | ||
| } | ||
|
|
||
| const BUILD_TIMEOUT_MS = 5 * 60 * 1000 | ||
|
|
||
| describe('E2B Template build test', () => { | ||
| it( | ||
| 'builds a basic template with Node.js', | ||
| { timeout: BUILD_TIMEOUT_MS }, | ||
| async () => { | ||
| const templateName = `test-template-${Date.now()}` | ||
|
|
||
| l.info('test:starting_template_build', { | ||
| templateName, | ||
| startTime: new Date().toISOString(), | ||
| }) | ||
|
|
||
| const template = Template() | ||
| .skipCache() | ||
| .fromNodeImage('lts') | ||
| .setWorkdir('/app') | ||
| .runCmd('echo "Hello from template build"') | ||
| .setStartCmd('node --version', 'node --version') | ||
|
|
||
| const buildInfo = await Template.build(template, { | ||
| alias: templateName, | ||
| apiKey: TEST_E2B_API_KEY, | ||
| domain: TEST_E2B_DOMAIN, | ||
| onBuildLogs: (log) => { | ||
| l.info('test:build_log', { | ||
| level: log.level, | ||
| message: log.message, | ||
| }) | ||
| }, | ||
| }) | ||
|
|
||
| l.info('test:template_build_completed', { | ||
| templateId: buildInfo.templateId, | ||
| buildId: buildInfo.buildId, | ||
| alias: buildInfo.alias, | ||
| endTime: new Date().toISOString(), | ||
| }) | ||
|
|
||
| expect(buildInfo.templateId).toBeDefined() | ||
| expect(buildInfo.buildId).toBeDefined() | ||
| } | ||
| ) | ||
| }) |
3 changes: 3 additions & 0 deletions
3
src/app/dashboard/[teamIdOrSlug]/templates/(tabs)/@builds/default.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export default function Default() { | ||
| return null | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/app/dashboard/[teamIdOrSlug]/templates/(tabs)/@builds/page.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import BuildsHeader from '@/features/dashboard/templates/builds/header' | ||
| import BuildsTable from '@/features/dashboard/templates/builds/table' | ||
|
|
||
| export default function BuildsPage() { | ||
| return ( | ||
| <div className="h-full min-h-0 flex-1 p-3 md:p-6 flex flex-col gap-3"> | ||
| <BuildsHeader /> | ||
| <BuildsTable /> | ||
| </div> | ||
| ) | ||
| } |
3 changes: 3 additions & 0 deletions
3
src/app/dashboard/[teamIdOrSlug]/templates/(tabs)/@list/default.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export default function Default() { | ||
| return null | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/app/dashboard/[teamIdOrSlug]/templates/(tabs)/@list/page.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import LoadingLayout from '@/features/dashboard/loading-layout' | ||
| import TemplatesTable from '@/features/dashboard/templates/list/table' | ||
| import { Suspense } from 'react' | ||
|
|
||
| export default async function ListPage() { | ||
| return ( | ||
| <Suspense fallback={<LoadingLayout />}> | ||
| <TemplatesTable /> | ||
| </Suspense> | ||
| ) | ||
| } | ||
33 changes: 33 additions & 0 deletions
33
src/app/dashboard/[teamIdOrSlug]/templates/(tabs)/layout.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { DashboardTab, DashboardTabs } from '@/ui/dashboard-tabs' | ||
| import { BuildIcon, ListIcon } from '@/ui/primitives/icons' | ||
|
|
||
| export default function TemplatesLayout({ | ||
| list, | ||
| builds, | ||
| }: LayoutProps<'/dashboard/[teamIdOrSlug]/templates'> & { | ||
| list: React.ReactNode | ||
| builds: React.ReactNode | ||
| }) { | ||
| return ( | ||
| <DashboardTabs | ||
| type="query" | ||
| layoutKey="tabs-indicator-templates" | ||
| className="pt-2 flex-1 md:pt-3" | ||
| > | ||
| <DashboardTab | ||
| id="list" | ||
| label="List" | ||
| icon={<ListIcon className="size-4" />} | ||
| > | ||
| {list} | ||
| </DashboardTab> | ||
| <DashboardTab | ||
| id="builds" | ||
| label="Builds" | ||
| icon={<BuildIcon className="size-4" />} | ||
| > | ||
| {builds} | ||
| </DashboardTab> | ||
| </DashboardTabs> | ||
| ) | ||
| } |
This file was deleted.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| import { Loader } from '@/ui/primitives/loader_d' | ||
| 'use client' | ||
|
|
||
| import { Loader } from '@/ui/primitives/loader' | ||
|
|
||
| export default function LoadingLayout() { | ||
| return ( | ||
| <div className="flex h-full w-full flex-1 items-center justify-center"> | ||
| <Loader className="text-xl" /> | ||
| <Loader variant="slash" /> | ||
| </div> | ||
| ) | ||
| } |
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { BuildStatusDTO } from '@/server/api/models/builds.models' | ||
|
|
||
| export const INITIAL_BUILD_STATUSES: BuildStatusDTO[] = [ | ||
| 'building', | ||
| 'failed', | ||
| 'success', | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.