-
Notifications
You must be signed in to change notification settings - Fork 607
feat: load deployment details UI from db #3942
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
chronark
merged 21 commits into
main
from
refactor_migrate_projects_to_TanStack_React_DB
Sep 15, 2025
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4bf4c68
feat: local first ratelimits
chronark 931f329
wip
chronark dd7856d
feat: sync drizzle to go/pkg/db/schema.sql (#3920)
chronark 5e933db
feat: script to notify users to migrate to v2 (#3924)
chronark 55ac9f7
fix: prevent duplicates
chronark 78808dc
fix: make reset async
chronark 99a6101
fix: 404
chronark 584b81f
fix: rename variable for clarity
chronark 3f6297b
fix: reset in parallel
chronark 7962ee9
chore: revert zod version
chronark dd64beb
fix: I don't even know, this restacking is fucking with my breain
chronark 1119eb1
chore: match zod schema
chronark 84de91f
refactor: migrate projects to TanStack React DB
chronark 47b3d7d
wip
chronark 4452bb9
revert: uncommit files
chronark e9bba4c
Merge branch 'main' of https://github.com/unkeyed/unkey into refactor…
chronark bab1236
wip: it builds again, I gotta go
chronark de11b58
fix: deployment filters
chronark f530efe
fix: make it build
chronark 324c314
Merge branch 'main' into refactor_migrate_projects_to_TanStack_React_DB
chronark c81659b
Apply suggestions from code review
chronark 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
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
26 changes: 11 additions & 15 deletions
26
.../components/controls/components/deployment-list-filters/components/environment-filter.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 |
|---|---|---|
| @@ -1,31 +1,27 @@ | ||
| import { FilterCheckbox } from "@/components/logs/checkbox/filter-checkbox"; | ||
| import { collection } from "@/lib/collections"; | ||
| import { useLiveQuery } from "@tanstack/react-db"; | ||
| import { useFilters } from "../../../../../hooks/use-filters"; | ||
|
|
||
| type EnvironmentOption = { | ||
| id: number; | ||
| environment: string; | ||
| checked: boolean; | ||
| }; | ||
|
|
||
| const options: EnvironmentOption[] = [ | ||
| { id: 1, environment: "production", checked: false }, | ||
| { id: 2, environment: "preview", checked: false }, | ||
| ] as const; | ||
|
|
||
| export const EnvironmentFilter = () => { | ||
| const { filters, updateFilters } = useFilters(); | ||
|
|
||
| const environments = useLiveQuery((q) => q.from({ environment: collection.environments })); | ||
|
|
||
| return ( | ||
| <FilterCheckbox | ||
| options={options} | ||
| options={environments.data.map((environment, i) => ({ | ||
| id: i, | ||
| slug: environment.slug, | ||
| }))} | ||
chronark marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
6
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Verify scope of environments. Are environments workspace-wide or project-scoped? If workspace-wide, consider filtering by current project to avoid irrelevant options or slug collisions. Also applies to: 18-25 🤖 Prompt for AI Agents
chronark marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| filterField="environment" | ||
| checkPath="environment" | ||
| checkPath="slug" | ||
| selectionMode="single" | ||
| renderOptionContent={(checkbox) => ( | ||
| <div className="text-accent-12 text-xs capitalize">{checkbox.environment}</div> | ||
| <div className="text-accent-12 text-xs capitalize">{checkbox.slug}</div> | ||
| )} | ||
| createFilterValue={(option) => ({ | ||
| value: option.environment, | ||
| value: option.slug, | ||
| })} | ||
| filters={filters} | ||
| updateFilters={updateFilters} | ||
|
|
||
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
2 changes: 1 addition & 1 deletion
2
...ts/components/table/components/actions/deployment-list-table-action.popover.constants.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
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
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.