-
Notifications
You must be signed in to change notification settings - Fork 11
J7m4/refactor filter to selector #415
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
J7m4/refactor filter to selector #415
Conversation
WalkthroughThis pull request introduces systematic renaming throughout the codebase to replace “filter” terminology with “condition” (or “selector” when applicable). Types, variables, hook names, API query parameters, database fields, and OpenAPI schemas have all been updated. For example, Changes
Possibly related PRs
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🔭 Outside diff range comments (13)
apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsx (1)
185-186:⚠️ Potential issueInconsistent terminology: UI text "Release Filter" should be updated.
While the code references have been updated to use "selector" terminology, the UI text here still uses "Release Filter". For consistency with the PR's purpose of refactoring from filter to selector, this should be updated to "Release Selector".
- Release Filter + Release Selectorapps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceSelector.ts (1)
37-39:⚠️ Potential issueInconsistency in URL parameter naming.
While most of the code has been updated to use "selector" terminology, this section still uses "filter" in the URL parameters.
Apply this diff to maintain consistent terminology:
if (filterJsonHash != null) - url.searchParams.set("filter", filterJsonHash); -if (filterJsonHash == null) url.searchParams.delete("filter"); + url.searchParams.set("selector", filterJsonHash); +if (filterJsonHash == null) url.searchParams.delete("selector");packages/job-dispatch/src/resource/utils.ts (1)
101-101:⚠️ Potential issueMissed field renaming in resource matching condition.
While most of the code has been updated to use "selector" terminology, line 101 still references
env.resourceFilterwhich should be updated to maintain consistency.Apply this diff to fix the inconsistency:
- schema.resourceMatchesMetadata(tx, env.resourceFilter), + schema.resourceMatchesMetadata(tx, env.resourceSelector),apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsx (1)
158-162:⚠️ Potential issueMissed FilterType reference
There's still a reference to
FilterType.Comparisonthat needs to be updated toSelectorType.Comparisonto maintain consistency with the other renames in this file.const filter: JobCondition = { - type: FilterType.Comparison, + type: SelectorType.Comparison, operator: ComparisonOperator.And, conditions: [isSameVersion, isSameEnvironment], };apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/_components/variables/VariableResourceInput.tsx (2)
30-58:⚠️ Potential issueComplete the refactoring of the
useResourcesFromEnvironmentfunctionThe function parameter and return value still use "filter" terminology while the internal implementation has been updated to use "selector".
Apply these changes for consistency:
const useResourcesFromEnvironment = ( system?: System, - existingFilter?: ResourceCondition, + existingSelector?: ResourceCondition, ) => { const { data: envs = [] } = api.environment.bySystemId.useQuery( system?.id ?? "", { enabled: system != null }, ); - const filter: ResourceCondition = { + const selector: ResourceCondition = { type: ResourceSelectorType.Comparison, operator: ResourceOperator.And, conditions: [ { type: ResourceSelectorType.Comparison, operator: ResourceOperator.Or, conditions: envs.map((e) => e.resourceSelector).filter(isPresent), }, - ...(existingFilter ? [existingFilter] : []), + ...(existingSelector ? [existingSelector] : []), ], }; const { data, isLoading } = api.resource.byWorkspaceId.list.useQuery( - { workspaceId: system?.workspaceId ?? "", filter }, + { workspaceId: system?.workspaceId ?? "", filter: selector }, { enabled: system != null, placeholderData: (prev) => prev }, ); - return { filter, resources: data?.items ?? [], isLoading }; + return { selector, resources: data?.items ?? [], isLoading }; };
60-94:⚠️ Potential issueComplete the refactoring of the
useResourcesWithSearchfunctionThe function still uses "filter" terminology in several places while part of the implementation has been updated to use "selector".
Apply these changes for consistency:
const useResourcesWithSearch = ( system?: System, - existingFilter?: ResourceCondition, + existingSelector?: ResourceCondition, ) => { const [search, setSearch] = useState(""); const { - filter: environmentFilters, + selector: environmentSelectors, resources, isLoading: allResourcesLoading, - } = useResourcesFromEnvironment(system, existingFilter); + } = useResourcesFromEnvironment(system, existingSelector); - const filterWithSearch: ResourceCondition = { + const selectorWithSearch: ResourceCondition = { type: ResourceSelectorType.Comparison, operator: ResourceOperator.And, conditions: [ - environmentFilters, + environmentSelectors, { type: ResourceSelectorType.Name, operator: ColumnOperator.Contains, value: search, }, ], }; const { data: { items: resourcesWithSearch } = { items: [] }, isLoading: textSeachResourcesLoading, } = api.resource.byWorkspaceId.list.useQuery( - { workspaceId: system?.workspaceId ?? "", filter: filterWithSearch }, + { workspaceId: system?.workspaceId ?? "", filter: selectorWithSearch }, { enabled: system != null, placeholderData: (prev) => prev }, ); const isLoading = textSeachResourcesLoading || allResourcesLoading; return { search, setSearch, resources, resourcesWithSearch, isLoading }; };apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx (1)
90-109: 💡 Verification agent🧩 Analysis chain
Inconsistent function naming.
While the hook has been updated to use
setSelector, the component still usessetFilterin multiple places. This inconsistency should be addressed to maintain a uniform naming convention throughout the component.Also applies to: 111-119, 137-138
🏁 Script executed:
#!/bin/bash # Check for any remaining uses of setFilter in the ResourcePageContent component rg -A 2 -B 2 "setFilter" "apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx"Length of output: 900
Rename
setFiltertosetSelectorfor consistency across the componentThere are several instances in the
ResourcePageContent.tsxcomponent wheresetFilteris still being used, despite the hook being updated to usesetSelector. To avoid confusion and enforce a uniform naming convention, please update all the occurrences ofsetFilterin this file. This includes, but is not limited to:
- The search condition update block (lines 90–109)
- The second occurrence around lines 111–119
- The filter update in the
onFilterChangecallback and usage inonSubmit/onClear(lines 137–138 and others)Once these refactors are complete, the component will be aligned with the updated hook interface.
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx (1)
502-509:⚠️ Potential issueFix remaining reference to
filtervariable.There's still a reference to the old
filtervariable at line 507, but the variable has been renamed toselector. This will cause a runtime error.<JobConditionDialog condition={selector} onChange={setFilter}> <div className="flex items-center gap-2"> <Button variant="ghost" size="icon" className="h-7 w-7"> <IconFilter className="h-4 w-4" /> </Button> - {filter != null && <JobConditionBadge condition={filter} />} + {selector != null && <JobConditionBadge condition={selector} />} </div> </JobConditionDialog>apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsx (3)
71-82:⚠️ Potential issueFix variable name inconsistency for
environmentFilters.The variable
environmentFilterson line 75 should be updated toenvironmentSelectorsto align with the global refactoring from "filter" to "selector".const selectorWithSearch: ResourceCondition = { type: ResourceSelectorType.Comparison, operator: ResourceOperator.And, conditions: [ - environmentFilters, + environmentSelectors, { type: ResourceSelectorType.Name, operator: ColumnOperator.Contains, value: search, }, ], };
88-90:⚠️ Potential issueFix remaining API query parameter using "filter" instead of "selector".
The API query is still using
filter: filterWithSearchinstead ofselector: selectorWithSearchwhich would break the functionality.api.resource.byWorkspaceId.list.useQuery( - { workspaceId: system?.workspaceId ?? "", filter: filterWithSearch }, + { workspaceId: system?.workspaceId ?? "", selector: selectorWithSearch }, { enabled: system != null, placeholderData: (prev) => prev }, )
101-104: 🛠️ Refactor suggestionUpdate component prop from
filtertoselectorfor consistency.The component still accepts a
filterprop even though all other occurrences have been renamed from "filter" to "selector". This should be updated for consistency.export const VariableResourceInput: React.FC< ResourceVariableConfigType & { value: string; onChange: (v: string) => void; } -> = ({ value, filter, onChange }) => { +> = ({ value, selector, onChange }) => { const params = useParams<{ workspaceSlug: string; systemSlug: string }>(); const { data: system } = api.system.bySlug.useQuery(params);Then update line 106 to use
selectorinstead offilter:const { search, setSearch, resources, resourcesWithSearch, isLoading } = - useResourcesWithSearch(system, filter); + useResourcesWithSearch(system, selector);Note: This change might require additional updates in other files where this component is used.
openapi.v1.json (1)
2623-2646:⚠️ Potential issueUpdated filter path parameter to selector in resources endpoint.
The path parameter in the endpoint for retrieving resources by filter has been changed from
/filterto/selector. However, the parameter description on line 2644 and name on line 2638 still use "filter" terminology.Update the parameter description and name to match the new terminology:
- "name": "filter", + "name": "selector", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Filter to apply to the resources" + "description": "Selector to apply to the resources"apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx (1)
108-108:⚠️ Potential issueFix unnecessary conditional flagged by linter
There's a TypeScript ESLint error indicating an unnecessary conditional at this line. The error suggests that one of the values in this expression is always falsy.
This error isn't directly related to the changes in this PR but should be addressed. Check if either
pendingJobsQ.isLoadingorinProgressJobsQ.isLoadingis always false in your use case, or if there's a more accurate way to determine the loading state.🧰 Tools
🪛 GitHub Check: Lint
[failure] 108-108:
Unnecessary conditional, value is always falsy🪛 GitHub Actions: CI
[error] 108-108: Unnecessary conditional, value is always falsy @typescript-eslint/no-unnecessary-condition
🧹 Nitpick comments (19)
packages/emails/src/Welcome.jsx (2)
4-5: Concise JSX Formatting Update
The return statement for the<MyEmail>component has been refactored into a more compact, single-line structure. This change preserves the component’s functionality while reducing vertical space. However, please verify that this style aligns with your team’s coding conventions, as a more expanded format might enhance readability and ease future modifications.
8-8: Closing Tag Formatting Consistency
The closing</Html>tag is now placed on the same line as the content, which is acceptable so long as it remains consistent with the project's style guide. Ensure that this formatting choice does not hinder maintainability in larger or more complex components.apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ComparisonConditionRender.tsx (1)
368-369: UI label mismatch with terminology.While all the type definitions have been updated to use "selector" terminology, this UI label still uses "Filter group" which is inconsistent with the new naming convention.
- Filter group + Selector groupapps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsx (1)
45-46: Inconsistent parameter naming: "filter" should be "selector"For consistency with the terminology change throughout the codebase, the parameter name should be updated from "filter" to "selector".
-const getFinalSelector = (filter: DeploymentVersionCondition | null) => - filter && !isEmptyCondition(filter) ? filter : undefined; +const getFinalSelector = (selector: DeploymentVersionCondition | null) => + selector && !isEmptyCondition(selector) ? selector : undefined;apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/providers/page.tsx (2)
124-128: Type usage updated but variable naming inconsistency exists.The type usage has been correctly updated from
ResourceFilterType.ProvidertoResourceSelectorType.Provider. However, the variable is still namedfilterwhile the type has been renamed to include "Selector". Consider renaming the variable for consistency.- const filter: ResourceCondition = { + const selector: ResourceCondition = { type: ResourceSelectorType.Provider, value: provider.id, operator: "equals", };
130-132: URL parameter naming inconsistency.While type names have been updated from "filter" to "selector", the URL parameter is still named "filter". Consider updating the URL parameter name for complete terminology consistency across the application.
- const filterLink = `/${workspaceSlug}/resources/list?filter=${hash}`; + const selectorLink = `/${workspaceSlug}/resources/list?selector=${hash}`; - return { ...provider, filterLink }; + return { ...provider, selectorLink };However, if backward compatibility with existing URLs is required, this might be intentional.
packages/job-dispatch/src/resource/dispatch-resource.ts (4)
160-181: Consider renaming function to match new terminologyThe function name
getNotInSystemFiltershould be updated togetNotInSystemSelectorto maintain consistency with the terminology change from "filter" to "selector" throughout the codebase.-const getNotInSystemFilter = async ( +const getNotInSystemSelector = async ( systemId: string, ): Promise<ResourceCondition | null> => {
203-203: Update variable name to match new terminologyThe variable name
notInSystemFiltershould be renamed tonotInSystemSelectorto maintain consistency with the terminology change.- const notInSystemFilter = await getNotInSystemFilter(systemId); + const notInSystemSelector = await getNotInSystemFilter(systemId);If you also rename the function as suggested in the previous comment, make sure to update the function call as well:
- const notInSystemSelector = await getNotInSystemFilter(systemId); + const notInSystemSelector = await getNotInSystemSelector(systemId);
204-207: Update variable reference to match new terminologyAfter renaming the variable, make sure to update this condition check to use the new variable name.
- if (notInSystemFilter == null) { + if (notInSystemSelector == null) { log.warn("No system found for environment", { envId }); return; }
210-213: Update variable reference in resourceMatchesMetadata callUpdate the parameter passed to
SCHEMA.resourceMatchesMetadatato use the renamed variable.const isRemovedFromSystem = SCHEMA.resourceMatchesMetadata( db, - notInSystemFilter, + notInSystemSelector, );apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/TableRow.tsx (1)
262-266: Verify usage offiltervariable nameThe variable name
filteris still being used here despite the PR renaming filter to selector throughout the codebase. Consider renaming this variable toselectorfor consistency.const filter: JobCondition = { type: SelectorType.Comparison, operator: ComparisonOperator.And, conditions: [isSameRelease, isSameResource, isSameEnvironment], }; const { data: releaseJobTriggers } = api.job.config.byWorkspaceId.list.useQuery( - { workspaceId: workspace?.id ?? "", filter }, + { workspaceId: workspace?.id ?? "", selector: filter }, { enabled: workspace != null }, );Alternatively, if the API parameter is still named
filter:- const filter: JobCondition = { + const selector: JobCondition = { type: SelectorType.Comparison, operator: ComparisonOperator.And, conditions: [isSameRelease, isSameResource, isSameEnvironment], }; const { data: releaseJobTriggers } = api.job.config.byWorkspaceId.list.useQuery( - { workspaceId: workspace?.id ?? "", filter }, + { workspaceId: workspace?.id ?? "", filter: selector }, { enabled: workspace != null }, );packages/api/src/router/deployment-variable.ts (1)
179-190:getOldResourceSelectorlogic.
This function merges multiple resource selectors or returns a single one if it's not the default. The approach is clear and valid.Consider factoring out common logic for a more concise structure, but the current setup is functional.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsx (1)
199-211: RefactoringgetFilterto wrap single conditions.
The function ensures a top-level comparison structure (ComparisonOperator.And) if the provided condition is not already comparison-based.Consider renaming
getFilterto something likeensureComparisonConditionfor clearer intent.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/policies/TargetFilterUniquenessIndicator.tsx (2)
102-107: User-facing message still references 'filter'While the component variables have been renamed to use 'selector', the user-facing message still references "resource filter". This should be updated for consistency.
- Please add a resource filter to select resources for this environment. + Please add a resource selector to select resources for this environment.
182-184: User-facing message still references 'filters'The explanatory text still mentions "resource filters" which should be updated to "resource selectors" for consistency with the rest of the changes.
- This may happen if you added new resources that match multiple resource filters. + This may happen if you added new resources that match multiple resource selectors.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/channels/CreateDeploymentVersionChannelDialog.tsx (1)
167-169: Button text updated but icon name remainsThe button text has been updated from "Edit filter" to "Edit selector", but the icon is still named
IconFilter. Consider also updating the icon name for complete consistency, although this would require changes to the import statement as well.If you'd like to maintain perfect consistency, you could consider one of:
- Importing and using an alternate icon like
IconAdjustmentsinstead ofIconFilter- Or, keeping the current icon but renaming the local reference for clarity:
-<IconFilter className="h-4 w-4" /> +<IconFilter className="h-4 w-4" /* This represents a selector icon */ />apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableEnvironmentInput.tsx (1)
57-57:❓ Verification inconclusive
Prop name may need grammatical review
The prop name has been changed from
shouldFiltertoshouldSelector, but this doesn't maintain grammatical correctness. Consider a prop name likeenableSelectionorshouldSelectinstead.-<Command shouldSelector={false}> +<Command shouldSelect={false}>Alternatively, ensure the component's API is consistent with other components that may have been renamed in this PR.
🏁 Script executed:
#!/bin/bash # Find other usages of shouldSelector/shouldFilter in the codebase echo "Checking for other usages of shouldSelector in the codebase:" rg -i "shouldSelector" --type tsx echo "Checking for other usages of shouldFilter in the codebase:" rg -i "shouldFilter" --type tsx echo "Checking the Command component definition to understand the prop name:" rg -A 10 -B 10 "shouldSelector.*?:" --type tsxLength of output: 607
Below is a revised review comment. Note that because the initial search commands failed to locate usages due to the file type flag, please re-run the verification using the updated commands (see script below) to ensure there aren’t any other locations using the old or new prop name unexpectedly.
Action Required: Revisit the Prop Naming for Consistency & Grammar
- The prop was renamed from
shouldFiltertoshouldSelector, which doesn’t read naturally. A clearer alternative would be using a name such asshouldSelect(or evenenableSelectionif that better fits the component’s API).- Confirm that this rename aligns with similar components in the codebase to maintain consistency in the API design.
- Suggested diff snippet:
-<Command shouldSelector={false}> +<Command shouldSelect={false}>Please re-verify the following with these updated search commands to confirm no additional instances need updating:
🏁 Script executed:
#!/bin/bash echo "Searching for other usages of shouldSelector in .tsx files:" rg -i "shouldSelector" -g "*.tsx" echo "Searching for other usages of shouldFilter in .tsx files:" rg -i "shouldFilter" -g "*.tsx" echo "Inspecting the Command component definition for the prop usage:" rg -A 15 -B 15 "shouldSelector.*?:" -g "*.tsx"Length of output: 2063
Action required: Unify and Clarify the Command Prop Naming
We observed that in this file the
Commandcomponent is using the propshouldSelector, whereas several other files still useshouldFilter. The termshouldSelectorisn’t grammatically intuitive. For clarity and consistency, consider renaming the prop toshouldSelect(or possiblyenableSelection, if that better reflects the intended functionality).For example:
-<Command shouldSelector={false}> +<Command shouldSelect={false}>Additionally, please review all instances of the
Commandcomponent—such as those inJobResourceConditionRender.tsxand variousVariable*Input.tsxfiles—to ensure that the prop naming is consistent across the codebase.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/ConfigFields.tsx (1)
291-292: Inconsistent terminology in button text.While all property references have been changed from
filtertoselector, the button text still says "Edit Filter". For consistency, consider updating this text as well.- <Button variant="outline">Edit Filter</Button> + <Button variant="outline">Edit Selector</Button>apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts (1)
58-58: Simplify the destructuring assignmentThe current destructuring uses a redundant rename.
-const { resourceSelector: resourceSelector } = form.watch(); +const { resourceSelector } = form.watch();🧰 Tools
🪛 Biome (1.9.4)
[error] 58-58: Useless rename.
Safe fix: Remove the renaming.
(lint/complexity/noUselessRename)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (96)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/DeploymentPageContent.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/DeploymentVersionEnvironmentCell.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/JobHistoryPopover.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/channels/CreateDeploymentVersionChannelDialog.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/DeploymentResourcesDialog.tsx(5 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/EditDeploymentSection.tsx(7 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/ConfigFields.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableDeploymentInput.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableEnvironmentInput.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableTable.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableValueDropdown.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/page.tsx(5 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/variable-data.ts(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/ResourcesPageContent.tsx(14 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_components/EditSelector.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useFilteredResources.ts(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/deployments/TableDeployments.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/environments/EnvironmentRow.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/policies/TargetFilterUniquenessIndicator.tsx(5 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/_components/variables/VariableResourceInput.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/create/RunbookVariableEditor.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/SystemsPageContent.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/_components/system-deployment-table/TableDeployments.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/DeploymentResourceDrawer.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/TableRow.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsx(5 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobComparisonConditionRender.tsx(12 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobResourceConditionRender.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/RunbookJobComparisonConditionRender.tsx(8 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ComparisonConditionRender.tsx(13 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ResourceViewActionsDropdown.tsx(4 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceSelector.ts(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/channel/useDeploymentVersionChannel.ts(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useFilter.ts(0 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useSelector.ts(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/insights/DailyJobsChart.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/SidebarKinds.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/providers/page.tsx(2 hunks)apps/webservice/src/app/api/v1/deployments/openapi.ts(1 hunks)apps/webservice/src/app/api/v1/environments/openapi.ts(1 hunks)apps/webservice/src/app/api/v1/openapi.ts(1 hunks)apps/webservice/src/app/api/v1/release-channels/openapi.ts(2 hunks)apps/webservice/src/app/api/v1/release-channels/route.ts(2 hunks)apps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/openapi.ts(3 hunks)apps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/route.ts(1 hunks)apps/webservice/src/app/terminal/_components/CreateDialogSession.tsx(1 hunks)openapi.v1.json(6 hunks)packages/api/src/router/deployment-variable.ts(9 hunks)packages/api/src/router/deployment-version.ts(3 hunks)packages/api/src/router/deployment.ts(2 hunks)packages/api/src/router/environment-page/deployments/deployment-stats.ts(2 hunks)packages/api/src/router/environment-page/overview/deployment-stats.ts(2 hunks)packages/api/src/router/environment-page/overview/router.ts(4 hunks)packages/api/src/router/environment-page/resources/router.ts(2 hunks)packages/api/src/router/environment-stats.ts(2 hunks)packages/api/src/router/environment.ts(4 hunks)packages/api/src/router/resource-stats.ts(1 hunks)packages/api/src/router/resource-views.ts(1 hunks)packages/api/src/router/resources.ts(3 hunks)packages/api/src/router/system.ts(2 hunks)packages/db/drizzle/0079_mute_cerise.sql(1 hunks)packages/db/drizzle/meta/_journal.json(1 hunks)packages/db/src/schema/deployment-variables.ts(2 hunks)packages/db/src/schema/deployment.ts(2 hunks)packages/db/src/schema/environment.ts(2 hunks)packages/db/src/schema/job.ts(3 hunks)packages/db/src/schema/resource.ts(3 hunks)packages/emails/src/Welcome.jsx(1 hunks)packages/emails/src/client/env.js(1 hunks)packages/emails/src/client/index.js(1 hunks)packages/emails/tailwind.config.js(1 hunks)packages/job-dispatch/src/__test__/job-variables-deployment.test.ts(8 hunks)packages/job-dispatch/src/deployment-update.ts(5 hunks)packages/job-dispatch/src/environment-creation.ts(2 hunks)packages/job-dispatch/src/environment-release-channel-update.ts(2 hunks)packages/job-dispatch/src/events/triggers/deployment-removed.ts(1 hunks)packages/job-dispatch/src/events/triggers/environment-deleted.ts(2 hunks)packages/job-dispatch/src/events/triggers/resource-deleted.ts(2 hunks)packages/job-dispatch/src/job-variables-deployment/job-variables-deployment.ts(1 hunks)packages/job-dispatch/src/job-variables-deployment/utils.ts(2 hunks)packages/job-dispatch/src/policies/release-sequencing.ts(2 hunks)packages/job-dispatch/src/release-job-trigger.ts(2 hunks)packages/job-dispatch/src/resource/dispatch-resource.ts(2 hunks)packages/job-dispatch/src/resource/utils.ts(1 hunks)packages/node-sdk/src/schema.ts(2 hunks)packages/validators/src/conditions/index.ts(1 hunks)packages/validators/src/jobs/conditions/job-condition.ts(3 hunks)packages/validators/src/resources/conditions/resource-condition.ts(5 hunks)
💤 Files with no reviewable changes (1)
- apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useFilter.ts
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{ts,tsx}`: **Note on Error Handling:** Avoid strict enforcement of try/catch blocks. Code may use early returns, Promise chains (.then().catch()), or other patterns for error...
**/*.{ts,tsx}: Note on Error Handling:
Avoid strict enforcement of try/catch blocks. Code may use early returns, Promise chains (.then().catch()), or other patterns for error handling. These are acceptable as long as they maintain clarity and predictability.
packages/job-dispatch/src/job-variables-deployment/job-variables-deployment.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/channels/CreateDeploymentVersionChannelDialog.tsxpackages/api/src/router/resource-views.tsapps/webservice/src/app/terminal/_components/CreateDialogSession.tsxpackages/api/src/router/environment-stats.tspackages/api/src/router/resource-stats.tspackages/job-dispatch/src/__test__/job-variables-deployment.test.tspackages/api/src/router/environment-page/resources/router.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableDeploymentInput.tsxpackages/api/src/router/environment-page/overview/deployment-stats.tsapps/webservice/src/app/[workspaceSlug]/(app)/_hooks/channel/useDeploymentVersionChannel.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_components/EditSelector.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableEnvironmentInput.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/environments/EnvironmentRow.tsxapps/webservice/src/app/api/v1/environments/openapi.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/JobHistoryPopover.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobResourceConditionRender.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/_components/variables/VariableResourceInput.tsxapps/webservice/src/app/api/v1/openapi.tspackages/validators/src/resources/conditions/resource-condition.tsapps/webservice/src/app/api/v1/release-channels/route.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/_components/system-deployment-table/TableDeployments.tsxpackages/db/src/schema/deployment-variables.tsapps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ResourceViewActionsDropdown.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ComparisonConditionRender.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/variable-data.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/DeploymentVersionEnvironmentCell.tsxpackages/job-dispatch/src/resource/dispatch-resource.tspackages/db/src/schema/environment.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/create/RunbookVariableEditor.tsxpackages/job-dispatch/src/job-variables-deployment/utils.tspackages/validators/src/conditions/index.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/ConfigFields.tsxapps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsxpackages/job-dispatch/src/policies/release-sequencing.tsapps/webservice/src/app/api/v1/deployments/openapi.tspackages/validators/src/jobs/conditions/job-condition.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useFilteredResources.tspackages/api/src/router/deployment-version.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/RunbookJobComparisonConditionRender.tsxapps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/SidebarKinds.tsxapps/webservice/src/app/api/v1/release-channels/openapi.tsapps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/DeploymentPageContent.tsxpackages/api/src/router/environment.tspackages/node-sdk/src/schema.tspackages/job-dispatch/src/resource/utils.tsapps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/DeploymentResourceDrawer.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/TableRow.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/page.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobComparisonConditionRender.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/deployments/TableDeployments.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useSelector.tspackages/api/src/router/deployment-variable.tsapps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/providers/page.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsxpackages/job-dispatch/src/environment-release-channel-update.tspackages/job-dispatch/src/events/triggers/deployment-removed.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.tsapps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceSelector.tspackages/job-dispatch/src/environment-creation.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsxpackages/api/src/router/deployment.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/DeploymentResourcesDialog.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableValueDropdown.tsxpackages/api/src/router/system.tsapps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/route.tspackages/api/src/router/environment-page/overview/router.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/EditDeploymentSection.tsxpackages/db/src/schema/deployment.tspackages/api/src/router/resources.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/policies/TargetFilterUniquenessIndicator.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/SystemsPageContent.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableTable.tsxpackages/job-dispatch/src/release-job-trigger.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/ResourcesPageContent.tsxpackages/db/src/schema/job.tspackages/job-dispatch/src/events/triggers/resource-deleted.tsapps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/openapi.tspackages/job-dispatch/src/events/triggers/environment-deleted.tsapps/webservice/src/app/[workspaceSlug]/(app)/insights/DailyJobsChart.tsxpackages/db/src/schema/resource.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsxpackages/job-dispatch/src/deployment-update.tsapps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsxpackages/api/src/router/environment-page/deployments/deployment-stats.ts
🧬 Code Definitions (30)
packages/api/src/router/environment-stats.ts (1)
packages/db/src/schema/environment.ts (1)
environment(49-74)
packages/api/src/router/resource-stats.ts (1)
packages/db/src/schema/environment.ts (1)
environment(49-74)
packages/api/src/router/environment-page/resources/router.ts (1)
packages/db/src/schema/environment.ts (1)
environment(49-74)
packages/api/src/router/environment-page/overview/deployment-stats.ts (1)
packages/db/src/schema/deployment.ts (1)
deployment(61-85)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_components/EditSelector.tsx (2)
packages/validators/src/resources/conditions/resource-condition.ts (1)
resourceCondition(38-48)packages/db/src/schema/environment.ts (1)
environment(49-74)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/environments/EnvironmentRow.tsx (1)
packages/db/src/schema/environment.ts (1)
environment(49-74)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/JobHistoryPopover.tsx (1)
packages/validators/src/jobs/conditions/job-condition.ts (1)
JobCondition(30-39)
packages/validators/src/resources/conditions/resource-condition.ts (6)
packages/validators/src/releases/conditions/release-condition.ts (2)
isCreatedAtCondition(91-94)isVersionCondition(86-89)packages/validators/src/jobs/conditions/job-condition.ts (2)
isCreatedAtCondition(79-81)isVersionCondition(97-99)packages/validators/src/conditions/date-condition.ts (1)
CreatedAtCondition(37-37)packages/validators/src/resources/conditions/last-sync-condition.ts (1)
LastSyncCondition(11-11)packages/validators/src/conditions/index.ts (1)
VersionCondition(40-40)packages/validators/src/resources/conditions/version-condition.ts (1)
VersionCondition(9-9)
packages/db/src/schema/deployment-variables.ts (1)
packages/validators/src/resources/conditions/resource-condition.ts (1)
resourceCondition(38-48)
apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ResourceViewActionsDropdown.tsx (2)
apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceSelector.ts (1)
useResourceSelector(9-72)packages/db/src/schema/resource.ts (1)
ResourceView(141-141)
packages/db/src/schema/environment.ts (1)
packages/validators/src/resources/conditions/resource-condition.ts (2)
resourceCondition(38-48)isValidResourceCondition(139-158)
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx (1)
packages/validators/src/jobs/conditions/job-condition.ts (1)
JobCondition(30-39)
packages/validators/src/jobs/conditions/job-condition.ts (4)
packages/validators/src/resources/conditions/resource-condition.ts (4)
isComparisonCondition(76-79)isMetadataCondition(102-105)isCreatedAtCondition(125-127)isVersionCondition(134-137)packages/validators/src/releases/conditions/release-condition.ts (4)
isComparisonCondition(58-61)isMetadataCondition(81-84)isCreatedAtCondition(91-94)isVersionCondition(86-89)packages/validators/src/conditions/metadata-condition.ts (1)
MetadataCondition(56-56)packages/validators/src/conditions/index.ts (1)
VersionCondition(40-40)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useFilteredResources.ts (1)
packages/validators/src/resources/conditions/resource-condition.ts (1)
ResourceCondition(27-36)
packages/api/src/router/deployment-version.ts (2)
packages/validators/src/cac/index.ts (1)
version(3-7)packages/validators/src/resources/conditions/resource-condition.ts (1)
ResourceCondition(27-36)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsx (1)
packages/validators/src/resources/conditions/resource-condition.ts (1)
ResourceCondition(27-36)
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx (1)
apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceSelector.ts (1)
useResourceSelector(9-72)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsx (1)
packages/validators/src/jobs/conditions/job-condition.ts (1)
JobCondition(30-39)
packages/job-dispatch/src/events/triggers/deployment-removed.ts (2)
packages/db/src/schema/deployment.ts (2)
deployment(61-85)Deployment(97-97)packages/validators/src/resources/conditions/resource-condition.ts (1)
ResourceCondition(27-36)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts (2)
packages/validators/src/resources/conditions/resource-condition.ts (3)
ResourceCondition(27-36)isComparisonCondition(76-79)resourceCondition(38-48)packages/db/src/schema/environment.ts (1)
environment(49-74)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/DeploymentResourcesDialog.tsx (1)
packages/validators/src/resources/conditions/resource-condition.ts (2)
ResourceCondition(27-36)isValidResourceCondition(139-158)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableValueDropdown.tsx (1)
packages/validators/src/resources/conditions/resource-condition.ts (1)
resourceCondition(38-48)
packages/api/src/router/environment-page/overview/router.ts (3)
packages/db/src/schema/environment.ts (1)
environment(49-74)packages/validators/src/resources/conditions/resource-condition.ts (1)
ResourceCondition(27-36)packages/db/src/schema/deployment.ts (1)
deployment(61-85)
packages/db/src/schema/deployment.ts (1)
packages/validators/src/resources/conditions/resource-condition.ts (2)
resourceCondition(38-48)isValidResourceCondition(139-158)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/ResourcesPageContent.tsx (2)
packages/validators/src/resources/conditions/resource-condition.ts (1)
ResourceCondition(27-36)packages/db/src/schema/environment.ts (1)
environment(49-74)
packages/db/src/schema/job.ts (3)
packages/db/src/schema/deployment-version.ts (1)
deploymentVersion(105-130)packages/db/src/schema/release-job-trigger.ts (1)
releaseJobTrigger(24-50)packages/db/src/schema/resource.ts (1)
resource(58-86)
packages/db/src/schema/resource.ts (1)
packages/validators/src/resources/conditions/resource-condition.ts (2)
ResourceCondition(27-36)resourceCondition(38-48)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx (2)
packages/db/src/schema/job.ts (1)
JobStatus(132-132)packages/validators/src/jobs/conditions/job-condition.ts (1)
JobCondition(30-39)
apps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsx (4)
packages/db/src/schema/resource.ts (1)
resourceView(131-139)packages/db/src/schema/environment.ts (1)
environment(49-74)packages/validators/src/resources/conditions/resource-condition.ts (2)
ResourceCondition(27-36)isComparisonCondition(76-79)packages/validators/src/jobs/conditions/job-condition.ts (1)
isComparisonCondition(71-73)
packages/api/src/router/environment-page/deployments/deployment-stats.ts (2)
packages/db/src/schema/environment.ts (1)
environment(49-74)packages/db/src/schema/deployment.ts (1)
deployment(61-85)
🪛 Biome (1.9.4)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts
[error] 58-58: Useless rename.
Safe fix: Remove the renaming.
(lint/complexity/noUselessRename)
🪛 GitHub Check: Lint
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx
[failure] 474-474:
'setSelector' is assigned a value but never used. Allowed unused vars must match /^_/u
🪛 GitHub Actions: CI
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx
[error] 108-108: Unnecessary conditional, value is always falsy @typescript-eslint/no-unnecessary-condition
🔇 Additional comments (299)
packages/validators/src/conditions/index.ts (1)
22-22: Naming update looks good!The renaming of
FilterTypetoSelectorTypealigns with the PR objective to standardize terminology across the codebase. This change maintains the same enum values while improving naming consistency.apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/SidebarKinds.tsx (4)
18-19: Consistent terminology change from Filter to Selector.The renamed import from
FilterTypetoSelectorTypealigns with the PR's objective of standardizing terminology across the codebase.
20-20: Consistent terminology change from ResourceFilterType to ResourceSelectorType.The import statement update maintains consistency with the project-wide terminology change from "filter" to "selector".
42-43: Updated filter type to selector type in the filter URL.The JSON object property now uses
SelectorType.Comparisoninstead ofFilterType.Comparison, keeping the same functionality while adopting the new terminology.
45-49: Updated conditions type from ResourceFilterType to ResourceSelectorType.The condition's type has been properly changed to use the new
ResourceSelectorType.Kindenum value while maintaining the same functionality.packages/api/src/router/deployment.ts (2)
505-505: LGTM, property name update is consistent with PR objectives.The change from
resourceFiltertoresourceSelectoraligns with the overall terminology refactoring in this PR.
530-531: LGTM, function parameter update is correct.The parameter passed to
SCHEMA.resourceMatchesMetadatahas been properly updated fromresourceFiltertoresourceSelector, maintaining consistency with the schema changes while preserving the original functionality.packages/emails/src/client/env.js (2)
4-11: Formatting and Consistency ImprovementThe restructuring of the
serverobject improves readability without altering the configuration logic. Each SMTP-related key now appears clearly and consistently, which helps ensure maintainability.
12-15: Improved Readability for Runtime Environment and Validation FlagsThe updated formatting for
runtimeEnvandskipValidationmakes the code easier to read and understand. The inline boolean coercion (using!!) is clear, and the use of logical OR for theskipValidationflag is well-arranged.packages/emails/src/Welcome.jsx (1)
1-11: Overall Component Verification
The component’s logic and exports remain unchanged, and the updated JSX formatting does not affect functionality. This change is cosmetic and fits within the broader refactoring effort. No issues were detected with the component's structure or behavior.apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/channel/useDeploymentVersionChannel.ts (2)
7-7: Import renamed correctly from FilterType to SelectorType.The import has been updated to use
SelectorTypeinstead ofFilterType, which is consistent with the PR's goal of renaming filter terminology to selector throughout the codebase.
36-36: Type reference updated properly to SelectorType.Comparison.The
typeproperty in theselectorobject has been correctly updated to useSelectorType.Comparisoninstead ofFilterType.Comparison, maintaining functionality while adhering to the new terminology.packages/api/src/router/resource-views.ts (1)
97-97: LGTM: Consistent terminology update from filter to selector.This change aligns with the PR objective of refactoring "filter" to "selector" across the codebase. The business logic remains unchanged while ensuring consistent terminology.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ComparisonConditionRender.tsx (3)
36-37: Import changes look good.The renamed imports (
SelectorTypeinstead ofFilterTypeandResourceSelectorTypeinstead ofResourceFilterType) follow the terminology standardization from "filter" to "selector" as outlined in the PR description.Also applies to: 41-42
82-83: Type adjustments in comparison condition creation are correct.The type property has been properly updated to use
ResourceSelectorType.Comparisoninstead ofResourceFilterType.Comparisonin both comparison condition creation scenarios.Also applies to: 117-118
271-275: Dropdown menu condition types updated consistently.All condition type definitions in the dropdown menu items have been correctly updated from their respective filter types to selector types, maintaining consistency throughout the UI.
Also applies to: 283-287, 294-298, 305-309, 316-320, 327-331, 338-342, 349-353, 361-366, 375-380
packages/api/src/router/resources.ts (3)
75-88: Parameter rename looks goodThe change from
resourceFiltertoresourceSelectorin theenvironmentHasResourcefunction signature and usage is implemented correctly, maintaining the sameResourceConditiontype. This is consistent with the PR's objective of standardizing terminology.
175-175: Consistent variable renameThe
hasFiltervariable now correctly checks for the presence ofresourceSelectorinstead ofresourceFilter, maintaining the same functionality while using the updated terminology.
205-207: Filter condition rename properly implementedThe renaming from
resourceFiltertoresourceSelectorin both the filter condition and in the function call toenvironmentHasResourceis correctly implemented, ensuring consistency throughout the codebase.apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsx (2)
24-26: Import renamed correctly from FilterType to SelectorType.The import has been properly updated as part of the filter-to-selector terminology change.
81-86: Usage correctly updated to SelectorType.Comparison.The type usage has been properly changed from FilterType.Comparison to SelectorType.Comparison in the getVersionSelector function.
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/providers/page.tsx (1)
40-40: Type import updated correctly.The import has been correctly changed from
ResourceFilterTypetoResourceSelectorType, which aligns with the PR objective of systematically updating terminology from "filter" to "selector" across the codebase.packages/validators/src/jobs/conditions/job-condition.ts (5)
17-17: Import renamed from FilterType to SelectorType - good!The import has been properly updated to reflect the new naming convention, maintaining consistency with the PR objective.
54-54: SelectorType.Comparison correctly replaces FilterType.ComparisonThe defaultCondition type property has been properly updated to use SelectorType.Comparison. This change is consistent with the updated naming convention.
60-66: Enum renamed from JobFilterType to JobSelectorTypeThe enum has been correctly renamed while preserving all its values, ensuring a clean terminology transition without changing the underlying functionality.
69-69: Updated condition type checks from FilterType to SelectorTypeAll SelectorType condition checks (Comparison, Metadata, CreatedAt, and Version) have been updated properly. This maintains consistency with the other changes in the PR.
Also applies to: 73-73, 77-77, 81-81, 99-99
85-85: Updated job-specific condition checks to use JobSelectorTypeAll job-specific condition checks (Status, Environment, Deployment, JobResource) have been properly updated to use JobSelectorType. These changes are consistent with the renaming pattern across the codebase.
Also applies to: 90-90, 95-95, 104-104
packages/api/src/router/environment.ts (6)
38-38: Good import rename from FilterType to SelectorTypeThis rename aligns with the project's goal of updating filter terminology to selector terminology throughout the codebase, starting with the imported types.
256-263: Consistent variable and condition renamingThe changes from
resourceFiltertoresourceSelectorandisUpdatingResourceFiltertoisUpdatingResourceSelectorare consistent with the project's terminology update. The logic remains identical while making the naming more consistent.
265-268: Properly updated condition blocksThe condition variable has been appropriately renamed from
hasResourceFiltersChangedtohasResourceSelectorsChangedwhile maintaining the same functional logic. The corresponding null check has also been updated.
275-277: Correctly updated array mappingThe mapping from environments to their corresponding selectors has been updated with the new field name while preserving the existing filtering logic.
279-283: Function parameters properly updatedThe parameters passed to
resourceMatchesMetadatahave been consistently renamed from filter to selector, maintaining the original functionality.
313-318: Type update for ResourceConditionThe type for the
sysFilterobject has been properly updated fromFilterType.ComparisontoSelectorType.Comparison, maintaining type safety while adopting the new terminology.packages/job-dispatch/src/resource/dispatch-resource.ts (4)
17-17: LGTM: Import statement updated correctlyThe import statement has been correctly updated from
ResourceFilterTypetoResourceSelectorType.
163-163: LGTM: Schema reference updated correctlyThe schema reference has been correctly updated from
SCHEMA.environment.resourceFiltertoSCHEMA.environment.resourceSelector.
170-172: LGTM: Environment mapping updated correctlyThe mapping from environment properties has been correctly updated from
e.resourceFiltertoe.resourceSelector.
175-180: LGTM: Return type updated correctlyThe return type in the object literal has been correctly updated from
ResourceFilterType.ComparisontoResourceSelectorType.Comparison.apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/TableRow.tsx (6)
20-20: LGTM - Type update aligned with the selector refactoringThis change correctly updates the import from
FilterTypetoSelectorType, maintaining consistency with the PR's objective of renaming filter to selector across the codebase.
23-23: LGTM - Type update aligned with the selector refactoringThis change correctly updates the import from
JobFilterTypetoJobSelectorType, following the PR's pattern of updating filter terminology to selector.
238-242: LGTM - Updated job condition type to use the new selector terminologyThe job condition's type property has been properly updated from
JobFilterType.ReleasetoJobSelectorType.Release, maintaining the same functionality while adopting the new naming convention.
244-248: LGTM - Updated job resource condition type to use the new selector terminologyThe job resource condition's type property has been properly updated from
JobFilterType.JobResourcetoJobSelectorType.JobResource, maintaining consistent terminology.
250-254: LGTM - Updated environment condition type to use the new selector terminologyThe environment condition's type property has been properly updated from
JobFilterType.EnvironmenttoJobSelectorType.Environment, following the pattern of renaming filter to selector.
256-260: LGTM - Updated comparison type to use the new selector terminologyThe filter object's type property has been properly updated from
FilterType.ComparisontoSelectorType.Comparison, maintaining the same functionality while using the new naming convention.packages/api/src/router/system.ts (3)
32-32: Import renaming looks goodThe import has been properly updated from
FilterTypetoSelectorType, which aligns with the PR objective of standardizing terminology across the codebase.
231-232: Database field reference updated correctlyThe check for non-null resource selector has been properly updated from
environment.resourceFiltertoenvironment.resourceSelector.
236-239:✅ Verification successful
Resource condition structure updated correctly
The code has been properly updated to use the new terminology:
type: SelectorType.Comparisoninstead ofFilterType.Comparison- Mapping to
env.resourceSelectorinstead ofenv.resourceFilterThese changes maintain consistency with the PR's renaming objective.
Please verify that the database schema has been updated to match these changes, specifically ensuring that the
resourceFiltercolumn in theenvironmenttable has been renamed toresourceSelector.
🏁 Script executed:
#!/bin/bash # Search for database schema definitions or migrations that would show the column rename rg -A 5 -B 5 "resourceSelector|resourceFilter" --type tsLength of output: 65595
Database Schema Update Verified
The database schema has been correctly updated. The environment table now defines the column as
resourceSelector(see, for example, inpackages/db/src/schema/environment.tswhere the column is declared asresourceSelector: jsonb("resource_selector")), ensuring consistency with the PR’s renaming changes. The code inpackages/api/src/router/system.tscorrectly maps toenv.resourceSelectorand aligns with these schema updates.packages/api/src/router/environment-stats.ts (2)
38-38: Properly renamed resourceFilter to resourceSelector in null check.This change correctly updates the null check to use the new property name, maintaining consistency with the database schema changes shown in the relevant code snippets.
92-92: Correctly updated function argument to use resourceSelector.The argument to
SCHEMA.resourceMatchesMetadatahas been properly updated to use the new property nameresourceSelectorinstead ofresourceFilter, ensuring consistency with the database schema.packages/db/drizzle/meta/_journal.json (1)
557-564: Migration entry for the filter-to-selector renaming looks goodThe added journal entry reflects a new database migration for renaming "filter" to "selector", which aligns with the broader terminology change throughout the codebase.
packages/api/src/router/resource-stats.ts (2)
168-168: Variable name updated consistently from resourceFilter to resourceSelectorThe null check has been properly updated to reference the renamed field, maintaining the same functionality.
173-173: Parameter name updated consistently in function callThe parameter passed to
SCHEMA.resourceMatchesMetadatahas been properly updated fromresourceFiltertoresourceSelector.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/environments/EnvironmentRow.tsx (2)
36-36: Query parameter name updated correctlyThe
filterparameter now correctly usesenvironment.resourceSelectorinstead ofresourceFilter, maintaining consistency with the database schema changes.
39-39: Query enabled condition updated properlyThe condition to enable the query now correctly checks if
environment.resourceSelectoris not null, matching the renamed field.apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useSelector.ts (1)
1-41: Well-implemented useSelector hook replacing useFilterThis new hook is a clean implementation that manages the selector state from URL parameters. The hook properly handles:
- Reading and parsing the selector from URL
- Error handling for malformed data
- Writing the selector back to URL in compressed format
- Clearing the selector when set to null
The implementation aligns with the project's transition from "filter" to "selector" terminology.
packages/job-dispatch/src/environment-release-channel-update.ts (3)
8-8: Import statement correctly updated to use SelectorType.The import has been properly updated to use
SelectorTypeinstead ofFilterType, aligning with the PR objective to rename filter to selector.
37-37: Type property correctly updated.Successfully updated from
FilterType.ComparisontoSelectorType.Comparisonwhile maintaining the same functionality.
45-45: Multiple type properties correctly updated.Both instances of
FilterType.Comparisonhave been properly changed toSelectorType.Comparisonin the nested condition structures, maintaining consistent terminology throughout.Also applies to: 49-49
apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/DeploymentResourceDrawer.tsx (3)
15-15: Import statements correctly updated.Imports have been properly updated from
FilterTypetoSelectorTypeandJobFilterTypetoJobSelectorType, aligning with the PR objective.Also applies to: 17-17
55-55: Job filter type property correctly updated.The
typeproperty in thejobFilterobject has been successfully updated fromFilterType.ComparisontoSelectorType.Comparison.
59-59: Job filter condition types correctly updated.All condition type properties have been successfully updated from
JobFilterTypetoJobSelectorTypewhile maintaining the same functionality for job resource, environment, and deployment conditions.Also applies to: 64-64, 69-69
apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobResourceConditionRender.tsx (4)
22-22: Import statements correctly updated.Imports have been properly updated from
FilterTypetoSelectorTypeandResourceFilterTypetoResourceSelectorType, aligning with the PR objective.Also applies to: 24-24
49-49: Search filter type property correctly updated.The
typeproperty in thesearchFilterobject has been successfully updated fromResourceFilterType.NametoResourceSelectorType.Name.
60-60: Resource property name correctly updated.The property accessed from the environment object has been updated from
resourceFiltertoresourceSelectorin theenvFiltersarray mapping.
64-64: System filter type properties correctly updated.Both instances of
FilterType.Comparisonhave been properly changed toSelectorType.Comparisonin the system filter objects, maintaining consistent terminology.Also applies to: 72-72
packages/job-dispatch/src/release-job-trigger.ts (3)
87-87: Schema property name correctly updated.The check for
isNotNull(SCHEMA.environment.resourceFilter)has been properly updated toisNotNull(SCHEMA.environment.resourceSelector).
141-142: Destructuring properties correctly updated.The destructured properties have been updated from
resourceFiltertoresourceSelectorfor both environment and deployment objects. Note that the variable namedeploymentResourceFilteris maintained for the second property despite usingresourceSelectorin the schema.
149-149: Schema method parameter correctly updated.The parameter passed to
SCHEMA.resourceMatchesMetadatahas been updated fromresourceFiltertoresourceSelector, maintaining consistent terminology.apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceSelector.ts (5)
9-9: Function name updated to match the selector terminology.The hook has been renamed from
useResourceFiltertouseResourceSelector, which aligns with the broader terminology change in the codebase.
14-14: Variable renamed for consistency.The URL parameter variable has been updated from
filterHashtoselectorHashto maintain consistent terminology.
16-18: Updated conditional check to use new parameter name.The null check and JSON parsing now correctly reference the renamed
selectorHashparameter.
22-22: Updated dependency array with new variable name.The dependency array in the useMemo hook has been updated to reference
selectorHash.
71-71: Updated return value to use selector terminology.The function now returns
setSelectorinstead ofsetFilterin the object, completing the naming transition.packages/job-dispatch/src/job-variables-deployment/utils.ts (3)
78-78: Parameter name changed to reflect selector terminology.The function parameter has been updated from
resourceFiltertoresourceSelectorto maintain consistent terminology across the codebase.
86-86: Updated parameter name in schema function call.The call to
SCHEMA.resourceMatchesMetadatanow correctly passes the renamed parameter.
99-99: Updated function call with renamed parameter.The function call to
getMatchedResourcenow uses the renamed parameterresourceSelector, maintaining consistency.packages/job-dispatch/src/resource/utils.ts (2)
79-79: Field renamed to match selector terminology.The field in the select statement has been updated from
resourceFiltertoresourceSelectorto align with the schema changes.
87-87: Updated field reference in condition check.The
isNotNullcheck now correctly references the renamed fieldschema.environment.resourceSelector.packages/db/src/schema/deployment-variables.ts (2)
63-65: Database column renamed to use selector terminology.The database column has been updated from
resourceFiltertoresourceSelector, maintaining the same type and default value configuration.
82-82: Updated schema validation to use renamed field.The Zod schema validation in
createDeploymentVariableValuehas been updated to reference the renamed field.packages/job-dispatch/src/events/triggers/resource-deleted.ts (4)
9-9: Import update looks goodThe import has been correctly updated from
ResourceFilterTypetoResourceSelectorTypeas part of the standardization of terminology from "filter" to "selector".
21-21: Property name change is consistentQuery correctly updated to check for non-null
resourceSelectorinstead ofresourceFilter.
28-29: Mapping selector properties correctlyThe mapping function now properly uses
e.resourceSelectorinstead ofe.resourceFilter, maintaining the same functionality while adopting the new terminology.
32-33: Type update is consistent with new naming conventionChanged from
ResourceFilterType.ComparisontoResourceSelectorType.Comparisoncorrectly, maintaining type safety.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/_components/system-deployment-table/TableDeployments.tsx (4)
21-22: Import update is consistentImport has been correctly changed from
FilterTypetoSelectorTypein line with the terminology standardization.
34-35: EnvHeader component correctly updatedThe property reference has been changed from
env.resourceFiltertoenv.resourceSelectorwithout altering the component's functionality.
69-71: Variable renaming in DirectoryHeader componentBoth the variable name
resourceSelectorsand the property accessenv.resourceSelectorhave been updated consistently.
73-79: Filter construction logic updated correctlyThe condition check and object construction have been properly updated to use the new terminology:
- Check for
resourceSelectors.lengthinstead ofresourceFilters.length- Type set to
SelectorType.Comparisoninstead ofFilterType.Comparison- Conditions property references
resourceSelectorsinstead ofresourceFiltersAll changes maintain the same business logic.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/RunbookJobComparisonConditionRender.tsx (7)
38-39: Import statements correctly updatedBoth imports have been properly renamed:
FilterType→SelectorTypeJobFilterType→JobSelectorTypeThis ensures type safety is maintained while implementing the new terminology.
Also applies to: 44-46
85-88: Type update in convertToComparison functionThe comparison condition type has been correctly updated to
SelectorType.Comparison.
120-124: Type update in convertToNotComparison functionThe not comparison condition type has been correctly updated to
SelectorType.Comparison.
279-284: Metadata condition type updateThe metadata condition type in the dropdown menu item handler has been correctly updated to
SelectorType.Metadata.
291-295: CreatedAt condition type updateThe created at condition type in the dropdown menu item handler has been correctly updated to
SelectorType.CreatedAt.
302-306: Job status condition type updateThe job status condition type has been correctly updated to
JobSelectorType.Status.
314-319: Comparison group condition types updateBoth filter group and not group condition types have been correctly updated to
SelectorType.Comparisonwhile maintaining the same functionality.Also applies to: 328-333
packages/db/src/schema/environment.ts (2)
60-62: Database schema field renamed correctlyThe database column has been properly renamed from
resourceFiltertoresourceSelectorwhile maintaining the same JSONB type and NULL default value.
79-81: Schema validation updateThe
createEnvironmentschema has been correctly updated to useresourceSelectorinstead ofresourceFilter, including the refinement function parameter rename fromfiltertoselector.This maintains the same validation logic where the value must either be null or a valid resource condition.
packages/db/src/schema/deployment.ts (2)
55-58: LGTM! Consistent renaming from filter to selector.The renaming of
resourceFiltertoresourceSelectorin the schema definition and the refinement function parameter is consistent with the PR objectives. The validation logic remains unchanged, preserving the same behavior while updating terminology.
80-82: LGTM! Database schema field renamed appropriately.The database field has been renamed from
resource_filtertoresource_selectorwhile maintaining the same type definition and default value. This change is consistent with the schema definition update above.packages/job-dispatch/src/environment-creation.ts (2)
17-18: LGTM! Variable renaming properly implemented.The destructuring and null check for
resourceSelector(previouslyresourceFilter) have been updated consistently. The conditional logic remains unchanged, maintaining the same behavior.
45-45: LGTM! Function parameter updated correctly.The function call to
SCHEMA.resourceMatchesMetadatanow correctly passesresourceSelectorinstead ofresourceFilter, completing the renaming in this file.packages/job-dispatch/src/events/triggers/deployment-removed.ts (4)
9-9: LGTM! Import statement updated correctly.The import has been changed from
ResourceFilterTypetoResourceSelectorType, aligning with the type renaming in the validators package.
15-15: LGTM! Schema reference updated properly.The check for non-null filters now correctly references
SCHEMA.environment.resourceSelectorinstead ofresourceFilter.
23-24: LGTM! Variable mapping updated consistently.The environment mapping now correctly extracts
resourceSelectorproperties instead ofresourceFilterproperties.
27-31: LGTM! Enum reference updated appropriately.The
systemFilterobject now correctly usesResourceSelectorType.Comparisoninstead ofResourceFilterType.Comparison.packages/validators/src/resources/conditions/resource-condition.ts (12)
15-18: LGTM! Imports updated correctly.The import has been updated to use
SelectorTypeinstead ofFilterType, maintaining consistency with the broader renaming effort.
58-67: LGTM! Enum renamed correctly.The
ResourceFilterTypeenum has been renamed toResourceSelectorTypewhile maintaining all the same values and structure.
69-74: LGTM! Default condition updated properly.The default condition now correctly uses
ResourceSelectorType.Comparisoninstead ofResourceFilterType.Comparison.
76-79: LGTM! Type check updated correctly.The
isComparisonConditionfunction now correctly compares againstResourceSelectorType.Comparison.
102-105: LGTM! Type check updated properly.The
isMetadataConditionfunction now correctly compares againstResourceSelectorType.Metadata.
107-109: LGTM! Type check updated properly.The
isKindConditionfunction now correctly compares againstResourceSelectorType.Kind.
111-113: LGTM! Type check updated properly.The
isNameConditionfunction now correctly compares againstResourceSelectorType.Name.
115-118: LGTM! Type check updated properly.The
isProviderConditionfunction now correctly compares againstResourceSelectorType.Provider.
120-123: LGTM! Type check updated properly.The
isIdentifierConditionfunction now correctly compares againstResourceSelectorType.Identifier.
125-127: LGTM! Type check remains consistent.The
isCreatedAtConditionfunction is correctly usingSelectorType.CreatedAtfrom the imported conditions module.
129-132: LGTM! Type check updated properly.The
isLastSyncConditionfunction now correctly compares againstResourceSelectorType.LastSync.
134-137: LGTM! Type check updated properly.The
isVersionConditionfunction now correctly compares againstResourceSelectorType.Version.packages/db/src/schema/job.ts (3)
42-45: Type imports updated to use Selector terminologyThe imports have been properly updated to reflect the new naming convention, changing from
FilterTypetoSelectorTypeandJobFilterTypetoJobSelectorType.
254-267: Consistent renaming in buildCondition functionThe
buildConditionfunction has been successfully updated to use the new selector terminology throughout all conditional branches. The logic itself remains unchanged, preserving the functionality while enhancing naming consistency.
275-293: Consistent renaming in buildRunbookCondition functionAll type checks in the
buildRunbookConditionfunction have been correctly updated to use the newSelectorTypeandJobSelectorTypeterminology. The conditional logic remains intact while maintaining naming consistency.packages/job-dispatch/src/deployment-update.ts (6)
10-12: Updated import to use SelectorTypeImport statement has been correctly modified to use
SelectorTypeinstead ofFilterType.
46-56: Resource selector references updated in environment queryReferences to
resourceFilterhave been properly updated toresourceSelectorin both the variable naming and in the environment data access.
60-64: SystemFilter definition updated to use SelectorTypeThe
systemFilterobject now correctly usesSelectorType.Comparisoninstead ofFilterType.Comparison.
111-115: isInSystem object updated to use SelectorTypeThe
isInSystemcondition object now usesSelectorType.Comparisonand correctly maps environments to theirresourceSelectorproperty.
117-127: Resource filter objects updated to use SelectorTypeBoth
oldResourcesFilterandnewResourcesFilterobjects have been correctly updated to useSelectorType.Comparisonand reference the newresourceSelectorproperties.
195-202: Updated equality check for deployment resource selectorThe comparison logic now correctly checks
resourceSelectorproperties instead ofresourceFilterproperties, maintaining consistency with the renamed schema fields.packages/api/src/router/deployment-version.ts (4)
32-34: Updated SelectorType importImport statement has been correctly modified to use
SelectorTypeinstead ofFilterType.
795-800: Updated resourceSelector checkThe condition check for the existence of a resource filter has been correctly modified to check
env.environment.resourceSelectorinstead ofresourceFilter.
802-809: Updated resourceSelector object creationThe
resourceSelectorcondition object now correctly usesSelectorType.Comparisonand properly references the renamedresourceSelectorproperties from both environment and deployment objects.
817-818: Updated resource matching function callThe resource metadata matching function is now correctly called with the renamed
resourceSelectorparameter.packages/api/src/router/environment-page/deployments/deployment-stats.ts (2)
9-11: Updated SelectorType importImport statement has been correctly modified to use
SelectorTypeinstead ofFilterType.
108-114: Updated resourceSelector object creationThe
resourceSelectorobject in thegetDeploymentStatsfunction now correctly usesSelectorType.Comparisonand references the renamedresourceSelectorproperties from both environment and deployment objects.packages/api/src/router/deployment-variable.ts (8)
42-42: Renaming fromFilterTypetoSelectorType.
This aligns with the overall rename across the codebase. Implementation looks good.
122-122: Consistency withenvironment.resourceSelector.
This change fromenvironment.resourceFiltertoenvironment.resourceSelectorfosters coherent naming across the environment references. Looks good.
130-132: Switching toSelectorType.Comparisonand mappingresourceSelector.
AdoptingSelectorType.Comparisonalong with.map((e) => e.resourceSelector)is consistent with the new naming approach.
192-204:getNewResourceSelectorlogic.
Similar togetOldResourceSelector, it conditionally composes the default or an individual resource selector. The approach is straightforward.
205-215: Constructing final old/new resource selectors.
CombiningsystemConditionwith the old/new resource selectors ensures environment-scoped matching is maintained.
219-219: UsingoldResourceSelectorinresourceMatchesMetadata.
This correct reference aligns with the rename from filter to selector.
226-226: UsingnewResourceSelectorinresourceMatchesMetadata.
Again, the consistent transition from filter to selector maintains clarity.
290-290: Updated comment referencingdeploymentVariableValueResourceSelector.
No functional issues. This clarifies the new naming in comments.packages/db/src/schema/resource.ts (4)
44-49: Renaming references toSelectorTypeandResourceSelectorType.
These changes match the broader naming refactor across the project.
138-139: Replacingfiltercolumn withselector.
Renaming toselectorinresource_viewis consistent with the updated terminology.
144-144: ApplyingresourceConditiontoselector.
Ensures theselectorfield increateResourceViewis validated by the correct schema.
290-305: Condition checks updated toResourceSelectorType&SelectorType.CreatedAt.
These lines reflect the move from filter-based to selector-based condition types. However, there's a mix ofResourceSelectorType.*andSelectorType.CreatedAt.Please verify that
CreatedAtbelongs underSelectorTypeinstead ofResourceSelectorTypefor full consistency.apps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsx (4)
27-27: Renaming toSelectorType.
The new import aligns with the broader rename from filter to selector across the codebase.
42-42: PassingresourceView.selectorinonChange.
Consistently uses the updatedselectorproperty, maintaining clarity.
105-105: Initializing form defaults withenvironment.resourceSelector.
This ensures the form is populated properly after the rename fromresourceFilter.
121-121: Updating mutation data to useresourceSelector.
Maintains consistency with the server-side environment schema.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/policies/TargetFilterUniquenessIndicator.tsx (6)
23-27: Function renaming looks goodThe function name change from
useResourceFilterUniquenesstouseResourceSelectorUniquenessis consistent with the overall PR objective of renaming "filter" to "selector".
35-37: Query key update is appropriateThe query key elements have been properly updated to reference the new property name.
47-49: Condition references properly updatedThe
resourceSelectorreferences in the conditions array have been correctly updated.
54-56: Enabled condition properly updatedThe query enabled check has been correctly updated to check for the
resourceSelectorproperty.
93-98: Component renaming looks goodThe export name has been updated from
ResourceFilterUniquenessIndicatortoResourceSelectorUniquenessIndicator, which aligns with the PR's renaming goal.
151-153: Updated data references in link generationThe references to
resourceSelectorin the link generation logic have been properly updated.packages/job-dispatch/src/events/triggers/environment-deleted.ts (6)
9-9: Import has been properly updatedThe import statement has been correctly updated to reference
ResourceSelectorTypeinstead ofResourceFilterType.
14-14: Null check updated appropriatelyThe null check has been properly updated to reference the new property name
resourceSelector.
20-21: Function parameter updated correctlyThe call to
SCHEMA.resourceMatchesMetadatahas been updated to passenvironment.resourceSelectorinstead ofenvironment.resourceFilter.
27-28: Schema condition check updatedThe
isNotNullcheck has been correctly updated to referenceSCHEMA.environment.resourceSelector.
36-38: Map reference updated correctlyThe mapping operation now properly references
e.resourceSelectorinstead ofe.resourceFilter.
40-45: Type reference updated in variable declarationThe constant declaration has been updated to use
ResourceSelectorType.Comparisoninstead ofResourceFilterType.Comparison.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableDeploymentInput.tsx (1)
57-57: Prop name updated fromshouldFiltertoshouldSelectorThe property name has been correctly updated from
shouldFiltertoshouldSelectorin the Command component, which aligns with the PR's objective of standardizing terminology from "filter" to "selector" across the codebase.apps/webservice/src/app/terminal/_components/CreateDialogSession.tsx (1)
51-55: Property name changed fromfiltertoselectorThe property name has been correctly updated from
filtertoselectorin the API query parameters. This change is consistent with the PR's objective of updating terminology throughout the codebase.apps/webservice/src/app/api/v1/openapi.ts (1)
195-199: API schema property renamed fromresourceFiltertoresourceSelectorThe property name has been successfully updated in the Environment schema definition from
resourceFiltertoresourceSelectorwhile maintaining the same structure and type information. This change aligns with the PR's goal of standardizing terminology across the codebase.apps/webservice/src/app/api/v1/environments/openapi.ts (1)
37-40: API request schema property renamed fromresourceFiltertoresourceSelectorThe property name has been correctly updated in the environment creation request body schema from
resourceFiltertoresourceSelector. This change ensures consistency with the other schema changes and aligns with the terminology standardization objective of the PR.packages/emails/tailwind.config.js (1)
3-18: Indentation consistency looks good.The configuration is properly structured with consistent indentation, making it more readable. All properties (content, presets, theme) maintain their original values and functionality.
packages/job-dispatch/src/__test__/job-variables-deployment.test.ts (1)
89-89: Consistent renaming from "resourceFilter" to "resourceSelector".All instances of
resourceFilterhave been properly renamed toresourceSelectorin the test environment objects, maintaining consistency with the broader refactoring effort across the codebase.Also applies to: 95-95, 101-101, 252-252, 322-322, 389-389, 456-456, 523-523, 620-620, 717-717
packages/api/src/router/environment-page/resources/router.ts (2)
11-11: Import statement updated from FilterType to SelectorType.The import statement has been correctly updated to use
SelectorTypeinstead ofFilterType, aligning with the terminology change throughout the codebase.
48-53: Updated resource condition type and property references.The code correctly:
- Uses
SelectorType.Comparisoninstead ofFilterType.Comparison- References
environment.resourceSelectorinstead ofenvironment.resourceFilterThese changes align with the database schema where the field is defined as
resourceSelector.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_components/EditSelector.tsx (2)
23-24: Updated mutation data property from resourceFilter to resourceSelector.The mutation data object property has been correctly updated to use
resourceSelectorinstead ofresourceFilter, ensuring the proper field is updated in the database.
29-30: Updated component prop from resourceFilter to resourceSelector.The
conditionprop passed to theResourceConditionDialogcomponent has been correctly updated to referenceenvironment.resourceSelectorinstead ofenvironment.resourceFilter, maintaining consistency with the renamed field.packages/api/src/router/environment-page/overview/deployment-stats.ts (2)
48-48: Consistent rename from filter to selectorThe change from
deployment.resourceFiltertodeployment.resourceSelectoraligns with the schema definition inpackages/db/src/schema/deployment.tswhere the field is defined asresourceSelector. This maintains consistency with the broader PR objective of renaming "filter" to "selector" throughout the codebase.
76-76: Consistent renaming in WHERE clauseGood job consistently updating the second instance of
deployment.resourceFiltertodeployment.resourceSelectorin this WHERE clause. Ensuring all references are updated prevents potential runtime errors.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsx (4)
34-35: Import update from FilterType to SelectorTypeThe import change from
FilterTypetoSelectorTypemaintains the consistent renaming pattern across the codebase.
38-38: Import update from JobFilterType to JobSelectorTypeThe import change from
JobFilterTypetoJobSelectorTypecorrectly implements the renaming pattern.
147-150: Updated JobSelectorType in conditionThe change from
JobFilterType.ReleasetoJobSelectorType.Releasecorrectly implements the type renaming.
153-156: Updated JobSelectorType for environment conditionThe change from
JobFilterType.EnvironmenttoJobSelectorType.Environmentcorrectly implements the type renaming.apps/webservice/src/app/api/v1/release-channels/route.ts (2)
14-16: Schema updated with releaseSelector propertyThe schema has been updated to use
releaseSelectorinstead ofreleaseFilterwhich aligns with the renaming pattern throughout the codebase.
29-29: Backwards compatibility for property accessGood implementation of backwards compatibility by handling both
body.versionSelectorandbody.releaseSelector. This allows for a smoother transition and prevents breaking changes for existing API consumers.apps/webservice/src/app/api/v1/deployments/openapi.ts (1)
64-67: Updated OpenAPI specification property name and descriptionThe OpenAPI specification has been updated to use
resourceSelectorinstead ofresourceFilterand the description has been updated accordingly. This ensures that the API documentation remains consistent with the implementation.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/variable-data.ts (1)
6-6: LGTM: Renamed property to align with new terminologyThe property renaming from
filterHashtoselectorHashis consistent with the broader terminology change from "filter" to "selector" across the codebase.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/_components/variables/VariableResourceInput.tsx (1)
21-23: LGTM: Import renamed correctlyThe import has been correctly updated from
ResourceFilterTypetoResourceSelectorType.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableTable.tsx (2)
72-72: LGTM: Input placeholder text updated correctlyThe placeholder text has been appropriately updated from "Filter variables..." to "Selector variables..." in line with the terminology changes.
269-269: LGTM: URL parameter updated correctlyThe URL parameter has been correctly updated from using
filter=${v.filterHash}toselector=${v.selectorHash}.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/JobHistoryPopover.tsx (3)
8-8: Import updates align with terminology changes.The import change from
JobFilterTypetoJobSelectorTypealigns with the PR objective of renaming "filter" to "selector" across the codebase.
28-32: Variable and type renamed correctly.The renaming of
inDeploymentFiltertoinDeploymentSelectorand updating the type toJobSelectorType.Deploymentmaintains consistency with the new terminology while preserving the original functionality.
45-45: Prop reference updated correctly.The
baseFilterprop now correctly references the renamedinDeploymentSelectorvariable, ensuring consistency throughout the component while maintaining the same behavior.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/create/RunbookVariableEditor.tsx (1)
56-58: Variable renaming maintains consistency while preserving logic.The variable has been correctly renamed from
isResourceFilterChangedtoisResourceSelectorChanged, and its usage in the conditional check has been updated accordingly. This change aligns with the PR's objective of standardizing terminology from "filter" to "selector" while maintaining the exact same functionality.Note that the property names
mergedConfig.filterandconfig.filterremain unchanged, which is likely due to these properties being defined in types or interfaces not visible in this file.apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ResourceViewActionsDropdown.tsx (4)
28-28: Import statement updated correctly.The import has been properly updated to use
useResourceSelectorinstead ofuseResourceFilter, aligning with the PR's standardization of terminology.
37-37: Function destructuring renamed correctly.The destructured function has been renamed from
setFiltertosetSelectorto maintain consistency with the new hook naming convention.
66-66: Function call updated appropriately.The function call has been updated to use
setSelector(null, null)instead ofsetFilter(null, null), maintaining the same functionality while using the new terminology.
85-86: Hook and function references properly renamed.Both the hook destructuring and the function that uses it have been updated to reflect the new terminology. The property access on line 86 has also been updated from
v.filtertov.selector, ensuring consistency with the database schema changes.packages/db/drizzle/0079_mute_cerise.sql (1)
1-4: Database migration script correctly renames columns.This SQL migration script appropriately renames all filter-related columns to use "selector" terminology across multiple tables:
resource_filter→resource_selectorindeployment_variable_valuetableresource_filter→resource_selectorindeploymenttableresource_filter→resource_selectorinenvironmenttablefilter→selectorinresource_viewtableThese changes are essential to ensure database schema consistency with the updated frontend terminology.
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/ConfigFields.tsx (2)
278-282: Function renamed for consistency but logic remains unchanged.The
onFilterChangefunction has been renamed toonSelectorChange, and all references tofilterwithin the function have been updated toselector. This aligns with the terminology shift from "filter" to "selector" across the codebase.
286-290: Condition references updated consistently.The JSX code has been properly updated to use
selectorinstead offilterfor the condition display and dialog.apps/webservice/src/app/api/v1/release-channels/openapi.ts (3)
20-20: Updated required fields in schema.The required field has been properly updated from
releaseFiltertoreleaseSelector, maintaining schema integrity while aligning with the new terminology.
25-28: API schema property renamed.The property in the request body schema has been renamed from
releaseFiltertoreleaseSelector, maintaining the same type definition and additional properties configuration.
47-50: Response schema property renamed.The property in the response schema has been renamed from
releaseFiltertoreleaseSelector, maintaining consistency with the request schema changes.apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx (2)
34-34: Imported hook renamed.The import has been updated from
useResourceFiltertouseResourceSelector, aligning with the terminology change.
86-86: Updated hook destructuring.The destructured values from the hook have been updated from
{ filter, setFilter }to{ filter, setSelector }, reflecting the new hook's interface.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useFilteredResources.ts (3)
11-11: Updated JSDoc parameter description.The JSDoc comment has been updated to reflect the parameter rename from
filtertoselector, maintaining documentation accuracy.
17-17: Function parameter renamed.The parameter has been renamed from
filtertoselectorwhile preserving the same type (ResourceCondition | null), ensuring the function signature remains correct.
22-22: Query parameter renamed in API call.The API query parameter has been updated from
filtertoselector, ensuring the hook correctly passes the renamed parameter to the API call.apps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/route.ts (4)
22-22: Terminology update in route handler parameter looks goodThe parameter type has been updated to use
selectorinstead offilter, maintaining consistency with the new terminology.
25-31: JSON parsing and validation updated correctlyAll references to
filterhave been properly renamed toselectorin the parsing and validation logic, maintaining the same functionality while using the new terminology.
33-33: Variable renaming looks goodVariable renaming from
filtertoselectoris consistent with the terminology update.
41-41: Database query parameter updated correctlyThe
SCHEMA.resourceMatchesMetadatafunction now correctly usesselectorinstead offilter.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/DeploymentVersionEnvironmentCell.tsx (3)
15-15: Import renamed from FilterType to SelectorTypeThe import has been correctly updated to use the new terminology.
51-61: Resource condition logic updated with new terminologyAll occurrences of
filterhave been properly renamed toselectorin this code block:
- Variable declaration and type
- Property checks for
environment.resourceSelectoranddeployment.resourceSelector- Type definition updated to
SelectorType.ComparisonThese changes maintain the original functionality while using the new terminology.
65-66: API query parameters updated correctlyThe query parameters and the enabled condition now correctly use
selectorinstead offilter, maintaining the functionality while updating the terminology.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts (5)
10-10: Import renamed from FilterType to SelectorTypeThe import statement has been correctly updated to use the new terminology.
19-31: getSelector function updated with new terminologyAll occurrences of
filterhave been properly renamed toselectorin thegetSelectorfunction:
- Function parameter renamed to
resourceSelector- Type definition updated to
SelectorType.Comparison- Return statement and condition checks updated
These changes maintain the original functionality while using the new terminology.
34-34: Form schema field renamed correctlyThe form schema field has been properly renamed from
resourceFiltertoresourceSelector.
54-54: Form default values updated correctlyThe default values in the form initialization now correctly reference
resourceSelectorinstead ofresourceFilter.
63-63: Mutation data field renamed correctlyThe mutation's data field has been properly renamed from
resourceFiltertoresourceSelector.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableValueDropdown.tsx (4)
61-65: Form schema field renamed correctlyThe
editVariableValueFormSchemahas been updated to useresourceSelectorinstead ofresourceFilter, maintaining the same validation rules while using the new terminology.
151-151: Form field name updated correctlyThe
FormFieldcomponent'snameprop has been updated fromresourceFiltertoresourceSelector.
154-154: Form label text updated correctlyThe label text has been updated from "Resource filter" to "Resource selector" to maintain terminology consistency.
185-188: Button action and text updated correctlyThe button that clears the selector value has been updated:
- The form value setter targets
resourceSelectorinstead ofresourceFilter- Button text changed from "Clear filter" to "Clear selector"
These changes maintain the original functionality while using the new terminology.
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/page.tsx (3)
52-58: LGTM! Consistent renaming of filter to selector.The variable
systemResourcesSelectorand its typeResourceSelectorType.Comparisonare correctly named, following the PR objective to rename all "filter" references to "selector".
67-77: Renaming is applied correctly to null checks and hash generation.The change from
resourceFiltertoresourceSelectoris consistently applied in both the null check and the hash generation code.
102-119: LGTM! Consistently renamed rest filters and updated condition types.The renaming from
resourceFiltertoresourceSelectoris consistently applied in variable naming and the ResourceSelectorType is correctly used in the condition objects.packages/node-sdk/src/schema.ts (2)
1713-1715: LGTM! Property name updated in request body.The property has been correctly renamed from
releaseFiltertoreleaseSelectorin the createReleaseChannel request body schema.
1733-1735: LGTM! Property name updated in response body.The property has been correctly renamed from
releaseFiltertoreleaseSelectorin the createReleaseChannel response body schema.packages/api/src/router/environment-page/overview/router.ts (4)
10-12: LGTM! Import renamed from FilterType to SelectorType.The import has been updated to use the new naming convention.
46-46: LGTM! Null check renamed for consistency.The null check on
environment.resourceSelectoris consistent with the renaming strategy.
66-66: LGTM! Function parameter renamed for consistency.The parameter to
SCHEMA.resourceMatchesMetadatahas been updated to use the new property name.
128-137: LGTM! ResourceCondition creation updated with new naming.The ResourceCondition creation now uses SelectorType instead of FilterType and correctly references the renamed properties:
environment.resourceSelectoranddeployment.resourceSelector.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/deployments/TableDeployments.tsx (3)
14-16: LGTM! Import renamed from FilterType to SelectorType.The import has been updated to use the new naming convention.
46-46: LGTM! Property access renamed for consistency.The property access has been updated from
resourceFiltertoresourceSelector.
84-93: LGTM! Variable names and condition type updated.All references have been renamed from filter to selector:
- Variable renamed from
resourceFilterstoresourceSelectors- Property access changed from
resourceFiltertoresourceSelector- Type changed from
FilterType.ComparisontoSelectorType.Comparison- Condition array correctly uses
resourceSelectorsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx (2)
40-40: Import statement updated correctly.The import statement has been properly updated from
useFiltertouseSelectorto align with the terminology change from "filter" to "selector".
476-476: Query parameter updated correctly.The parameter name has been properly updated from
filtertoselectorto align with the terminology change.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/DeploymentPageContent.tsx (4)
38-38: Import statement updated correctly.The import has been properly updated from
FilterTypetoSelectorTypeto align with the terminology change.
65-72: Variable and type names updated consistently.The variable names have been properly updated from
resourceFiltertoresourceSelector, and the condition type has been changed fromFilterType.ComparisontoSelectorType.Comparisonfor consistency.
75-76: Query parameters updated correctly.The parameter name has been properly updated from
filtertoselectorto align with the terminology change, including theenabledcondition check.
108-117: Directory header variable and type names updated consistently.The variable names have been properly updated from filter-related to selector-related terms, and the condition type has been changed consistently for directories as well.
apps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/openapi.ts (3)
7-10: OpenAPI path and operation details updated consistently.The endpoint path has been correctly updated from
resources/{filter}toresources/{selector}. The summary and operationId have also been properly updated to reflect the terminology change.
20-25: Parameter name and description updated consistently.The parameter name has been properly updated from
filtertoselector, and its description has been updated accordingly.
40-40: Error description updated consistently.The error description has been properly updated from "Invalid filter" to "Invalid selector" to align with the terminology change.
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsx (5)
21-23: Import statement updated correctly.The import has been properly updated from
ResourceFilterTypetoResourceSelectorTypeto align with the terminology change.
32-33: Parameter name updated correctly.The parameter name has been properly updated from
existingFiltertoexistingSelectorto align with the terminology change.
39-49: Variable name and type updated, but condition structure remains consistent.The variable name has been properly updated from
filtertoselector, and the type has been updated to useResourceSelectorType.Comparisoninstead ofResourceFilterType.Comparison.
57-58: Return value name updated correctly.The return value has been properly updated from
filtertoselectorto align with the terminology change.
66-70: Variable name in destructured object updated correctly.The variable name in the destructured object has been properly updated from
filtertoselectorto align with the terminology change.apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobComparisonConditionRender.tsx (13)
36-38: Consistent type renaming from Filter to Selector.The import statement has been updated to use
SelectorTypeinstead ofFilterType, aligning with the refactoring goal of changing terminology from "filter" to "selector" throughout the codebase.
42-44: Type import renamed from JobFilterType to JobSelectorType.The import has been correctly updated to use the new naming convention, maintaining consistency with the other type changes.
83-87: Condition type updated to use SelectorType.The comparison condition type value has been updated from
FilterType.ComparisontoSelectorType.Comparison, which is consistent with the imports and overall refactoring approach.
118-123: Updated comparison condition type to SelectorType.The not comparison condition type has been correctly updated to use
SelectorType.Comparisoninstead ofFilterType.Comparison.
277-282: Updated metadata condition type to SelectorType.The metadata condition creation uses the new
SelectorType.Metadatatype, maintaining consistency with the refactoring pattern.
289-293: Updated CreatedAt condition type to SelectorType.The date condition creation now uses
SelectorType.CreatedAtinstead ofFilterType.CreatedAt.
300-304: Updated job status condition type to JobSelectorType.The job status condition has been updated to use
JobSelectorType.Statusinstead ofJobFilterType.Status.
311-315: Updated job resource condition type to JobSelectorType.The job resource condition has been updated to use
JobSelectorType.JobResourceinstead ofJobFilterType.JobResource.
322-326: Updated deployment condition type to JobSelectorType.The deployment condition has been updated to use
JobSelectorType.Deploymentinstead ofJobFilterType.Deployment.
333-337: Updated environment condition type to JobSelectorType.The environment condition has been updated to use
JobSelectorType.Environmentinstead ofJobFilterType.Environment.
344-348: Updated version condition type to SelectorType.The version condition has been updated to use
SelectorType.Versioninstead ofFilterType.Version.
356-361: Updated filter group condition type to SelectorType.The filter group condition has been updated to use
SelectorType.Comparisoninstead ofFilterType.Comparison.
370-375: Updated not group condition type to SelectorType.The not group condition has been updated to use
SelectorType.Comparisoninstead ofFilterType.Comparison.openapi.v1.json (4)
398-404: Updated resourceFilter to resourceSelector in deployment creation schema.The API schema now uses
resourceSelectorinstead ofresourceFilterin the deployment creation endpoint, including updating the description to match. This maintains consistency with the terminology changes throughout the codebase.
568-571: Updated resourceFilter to resourceSelector in environment schema.The environment schema has been updated to use
resourceSelectorinstead ofresourceFilter, maintaining consistency with the terminology changes.
1261-1277: Updated releaseFilter to releaseSelector in release channel schema.The release channel creation schema now uses
releaseSelectorinstead ofreleaseFilter, maintaining consistency with the terminology changes.
1308-1311: Updated releaseFilter to releaseSelector in response schema.The response schema for release channel creation has been updated to use
releaseSelectorinstead ofreleaseFilter.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/EditDeploymentSection.tsx (8)
96-97: Updated success message key to resourceSelector.The success message state now uses
resourceSelectorinstead ofresourceFilterto maintain consistency with the refactoring changes.
99-102: Updated environment filter references to selector.The environment filtering logic now uses
resourceSelectorinstead ofresourceFilter, maintaining consistency with the refactoring changes.
104-109: Updated resourceFilter variables to resourceSelector.The variable and default values have been updated to use
resourceSelectorinstead ofresourceFilter, maintaining consistency with the refactoring changes.
130-140: Updated form submission logic to use selector terminology.The form submission logic now uses
selectorinstead offiltervariables, and updates the deployment withresourceSelectorinstead ofresourceFilter.
171-172: Updated watched form field to resourceSelector.The form field watch variable has been updated to use
watchResourceSelectorinstead ofwatchResourceFilter.
183-185: Updated dirty check variable to resourceSelectorDirty.The dirty check for the resource selector has been updated to use
resourceSelectorDirtyinstead ofresourceFilterDirty.
399-400: Updated form field name to resourceSelector.The form field name has been updated to use
resourceSelectorinstead ofresourceFilter.
441-445: Updated save button functionality for resourceSelector.The save button's onClick handler and disabled state now reference
resourceSelectorinstead ofresourceFilter, and the success message has been updated accordingly.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/DeploymentResourcesDialog.tsx (8)
24-25: Updated import from FilterType to SelectorType.The import statement has been updated to use
SelectorTypeinstead ofFilterType, maintaining consistency with the refactoring.
35-36: Updated Environment type to use resourceSelector.The Environment type now uses
resourceSelectorinstead ofresourceFilter, maintaining consistency with the refactoring.
38-41: Updated props type to use resourceSelector.The DeploymentResourcesDialogProps type now uses
resourceSelectorinstead ofresourceFilter.
45-55: Updated component implementation to use selector terminology.The component implementation now uses
resourceSelectorinstead ofresourceFilterfor props, and the internal variable has been renamed fromfiltertoselectorwith the type updated toSelectorType.Comparison.
56-61: Updated validity check and query to use selector terminology.The validity check now uses
isSelectorValidinstead ofisFilterValid, and the query to the API now usesselectorinstead offilter.
74-75: Updated button disabled state to check resourceSelector.The button's disabled state now checks the validity of
resourceSelectorinstead ofresourceFilter.
83-85: Updated dialog description to use selector terminology.The dialog description now refers to "deployment selector" instead of "deployment filter", maintaining consistency with the refactoring.
109-115: Updated condition rendering and resource list to use selector.The rendering of the resource condition and resource list now use the
selectorvariable instead offilter.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/ResourcesPageContent.tsx (9)
41-41: LGTM: Consistent type renaming in importsThe type imports have been updated from filter-related types to selector-related types, which aligns with the PR's goal of standardizing terminology.
Also applies to: 44-44
80-94: Function renamed correctly with maintained behaviorThe function
parseResourceSelector(previouslyparseResourceFilter) maintains the same logic while using the updated terminology.
96-138: LGTM: Function maintains logic with updated type referencesThe function has been updated to use
ResourceSelectorTypeandSelectorTypeinstead of their filter counterparts, while maintaining the same logic and behavior.
140-180: Search functionality properly updated with new selector terminologyThe search functionality continues to work as expected with the updated naming convention, using
ResourceSelectorType.Nameinstead ofResourceFilterType.Name.
189-190: LGTM: Environmental resource selector integrationThe code correctly uses
environment.resourceSelectorinstead ofenvironment.resourceFilterand constructs the final filter usingSelectorType.Comparison.Also applies to: 215-219
229-239: Filter dropdown handler updated properlyThe handler function now works with
ResourceSelectorTypeinstead ofResourceFilterTypewhile maintaining the same functionality.
259-259: Conditional check correctly updatedThe null check has been properly updated to use
environment.resourceSelectorinstead ofenvironment.resourceFilter.
371-372: LGTM: ResourceConditionDialog onChange handler updatedThe change handler now correctly uses
parseResourceSelectorinstead ofparseResourceFilter.
386-387: Dropdown value change handlers properly updatedThe dropdown handlers are correctly using
ResourceSelectorTypeenums instead ofResourceFilterTypeenums.Also applies to: 399-400, 418-419
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx (5)
23-25: LGTM: Updated import statements correctlyImport statements have been properly modified to use
SelectorTypeinstead ofFilterTypeandJobSelectorTypeinstead ofJobFilterType.
48-49: Type references updated consistently in condition objectsAll condition type references have been properly updated to use
JobSelectorTypeinstead ofJobFilterType.Also applies to: 54-55, 60-61, 66-67
72-76: LGTM: Comparison condition type updatedThe comparison condition now correctly uses
SelectorType.Comparisoninstead ofFilterType.Comparison.
78-88: Variable names and types updated properlyThe variable names and types have been consistently updated from filter terminology to selector terminology.
93-94: API query parameters renamed correctlyThe API query parameters have been updated from
filtertoselectorto match the backend changes.Also applies to: 102-103
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx (1)
61-66:❓ Verification inconclusive
Remaining "filter" references should be updated to "selector"
For consistency with the type system changes, the variable and parameter names should also be updated:
- const filter = getFilter(resourceId, stats.id); + const selector = getSelector(resourceId, stats.id); const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( - { workspaceId, filter, limit: 1 }, + { workspaceId, selector, limit: 1 }, { refetchInterval: 5_000 }, );Note: This change assumes the API parameter has also been updated to accept
selectorinstead offilterin other files. Verify this is the case across the codebase.
Below is a shell script to verify whether the new naming (i.e. using “selector” instead of “filter”) has been applied consistently. In particular, it searches for usages of the new function name and API query calls that include “selector”:
Once these commands return output confirming that:
• A function calledgetSelectorexists and is used in place ofgetFilter
• The API query calls now pass a parameter namedselectorinstead offilter…please update the review comment as follows:
Update 'filter' References to 'selector' for API Consistency
In
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx, update the variable and parameter names fromfiltertoselectorto keep consistent with the type system changes. Specifically:
- Change:
- const filter = getFilter(resourceId, stats.id); - - const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( - { workspaceId, filter, limit: 1 }, - { refetchInterval: 5_000 }, - );- To:
+ const selector = getSelector(resourceId, stats.id); + + const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( + { workspaceId, selector, limit: 1 }, + { refetchInterval: 5_000 }, + );Action Required:
• Verify that the API has been updated across the codebase to accept theselectorparameter instead offilter.
• Confirm that all references to the oldfilternaming are replaced accordingly.
Once confirmed via the shell script outputs, you can proceed with this update.
🏁 Script executed:
#!/bin/bash echo "Searching for references to getSelector across the codebase..." rg "getSelector" -n . echo "Searching for API queries using 'selector' as a parameter..." rg "useQuery.*selector" -n .Length of output: 861
Below is an additional script to check the usage of the old “filter” references specifically within the file in question. Please run these commands and verify that the file still uses
getFilter/filterrather than the newgetSelector/selector:Once you confirm that the above script returns references indicating the old naming, please update the file as follows:
Action Required: Update 'filter' References to 'selector' for Consistency
In
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx(lines 61–66), change the variable and parameter names fromfiltertoselectorto match the type system updates. For example:- const filter = getFilter(resourceId, stats.id); + const selector = getSelector(resourceId, stats.id); - const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( - { workspaceId, filter, limit: 1 }, - { refetchInterval: 5_000 }, - ); + const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( + { workspaceId, selector, limit: 1 }, + { refetchInterval: 5_000 }, + );Please Note:
- A function called
getSelectoris already used—see for instance its usage inapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.tsx.- Ensure that the API’s parameter naming has been updated accordingly from
filtertoselectoracross the codebase.Once you have verified these points, the changes in ResourceDeploymentRow.tsx can be safely made.
🏁 Script executed:
#!/bin/bash echo "Checking for occurrences of 'getFilter' in ResourceDeploymentRow.tsx..." rg "getFilter" -n "apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx" echo "Checking for API query usage of 'filter' in ResourceDeploymentRow.tsx..." rg "useQuery.*filter" -n "apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx"Length of output: 852
Update "filter" References to "selector" for API Consistency
In
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx, the current implementation continues to use the old naming:- const filter = getFilter(resourceId, stats.id); - - const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( - { workspaceId, filter, limit: 1 }, - { refetchInterval: 5_000 }, - );Please update these lines as follows:
+ const selector = getSelector(resourceId, stats.id); + + const { data, isLoading } = api.job.config.byWorkspaceId.list.useQuery( + { workspaceId, selector, limit: 1 }, + { refetchInterval: 5_000 }, + );Action Items:
- Confirm that the new function
getSelectoris correctly implemented (see its usage in other files, e.g., inuseEnvResourceEditor.tsx).- Verify that the API parameter has been updated to accept
selectorinstead offilterthroughout the codebase.packages/emails/src/client/index.js (2)
4-10: Code formatting looks good.The indentation has been consistently updated to use 4 spaces throughout the configuration object, which improves readability.
13-13: Consistent formatting applied.The return statement's indentation has been updated to match the new 4-space standard, maintaining consistency with the rest of the file.
packages/job-dispatch/src/job-variables-deployment/job-variables-deployment.ts (1)
147-149: Successfully renamed filter to selector.The property name has been updated from
resourceFiltertoresourceSelector, which aligns with the PR objective of standardizing terminology across the codebase.packages/job-dispatch/src/policies/release-sequencing.ts (2)
92-95: Properly renamed filter to selector in query selection.The property name has been updated from
rcReleaseFiltertorcReleaseSelectorin the releaseChannelSubquery, maintaining consistent terminology.
150-152: Updated property access to use new selector naming.Updated the property access to use the renamed
rcReleaseSelectorproperty, ensuring consistency with the change made to the releaseChannelSubquery.apps/webservice/src/app/[workspaceSlug]/(app)/insights/DailyJobsChart.tsx (3)
24-24: LGTM: Imports updated to new selector terminology.The imports have been correctly updated from
FilterTypetoSelectorTypeand fromJobFilterTypetoJobSelectorTypeas part of the terminology standardization.Also applies to: 26-26
210-210: LGTM: Condition types consistently updated.All condition type references have been systematically updated:
FilterType.CreatedAt→SelectorType.CreatedAtJobFilterType.Status→JobSelectorType.StatusFilterType.Comparison→SelectorType.ComparisonThis ensures consistent typing throughout the component.
Also applies to: 216-216, 222-222, 228-228, 234-234, 240-240, 251-251
58-58:❓ Verification inconclusive
Consider updating remaining "filter" references.
While the type references have been updated, there are still instances of "filter" terminology in:
- The
baseFilterprop name (line 58)- The URL parameter
filterLinkand query paramfilter=${hash}(line 265)For complete consistency, consider updating these as well. However, if these names are tied to API contracts or URL structures that haven't been changed, keeping them might be appropriate.
Also applies to: 265-265
🏁 Script executed:
#!/bin/bash # Check if other components use similar URL parameters or prop names # to determine if this is a global pattern echo "Checking for URL query parameter usage:" rg "filter=.*?\"" --type ts --type tsx echo "Checking for baseFilter prop usage:" rg "baseFilter" --type ts --type tsxLength of output: 302
Review Update: Verify Remaining "filter" References
The type references have been updated, but some “filter” nomenclature remains that could lead to inconsistency. In particular:
- The
baseFilterprop defined at line 58.- The URL parameter
filterLinkand the query parameterfilter=${hash}at line 265.Recommendation:
- If these usages aren’t tied to external API contracts or URL structures, update them for consistency.
- Otherwise, if they must remain unchanged due to API dependencies, please document the rationale for retaining the legacy naming.
Please run the above script or manually verify all occurrences in the codebase to ensure no unintended side effects.
🏁 Script executed:
#!/bin/bash # Re-run the search without file type restrictions to capture all instances. echo "Checking for 'baseFilter' usage in DailyJobsChart.tsx:" rg "baseFilter" apps/webservice/src/app/\[workspaceSlug\]/\(app\)/insights/DailyJobsChart.tsx echo "Checking for 'filterLink' usage in DailyJobsChart.tsx:" rg "filterLink" apps/webservice/src/app/\[workspaceSlug\]/\(app\)/insights/DailyJobsChart.tsx echo "Checking for query parameter references (e.g., filter=) in DailyJobsChart.tsx:" rg 'filter=' apps/webservice/src/app/\[workspaceSlug\]/\(app\)/insights/DailyJobsChart.tsxLength of output: 1096
Action: Verify and Update "filter" Naming Consistency
The current implementation in
apps/webservice/src/app/[workspaceSlug]/(app)/insights/DailyJobsChart.tsxstill uses the term "filter" in two places:
Prop Name:
- The property
baseFilter?: JobCondition;is defined (line 58) and passed along as part of the component's props.URL References:
- The variable
filterLinkis constructed ason line 265, embedding the query parameterconst filterLink = `/${workspaceSlug}/jobs?filter=${hash}`;filter=${hash}in the URL.For complete consistency, consider updating these to match the new naming conventions if they aren’t tied to external API contracts or URL architectures. If these names are bound by contractual or backward-compatibility reasons, please document the decision to retain them.
Please manually verify this change’s impact on any API contracts or the parts of the system that might depend on the current naming before updating.
| filter, | ||
| sort, | ||
| setFilter: (filter: string) => setParams({ filter }), | ||
| setFilter: (filter: string) => setParams({ selector: selector }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the reference error in the setFilter function
There's a variable naming issue in the setFilter function. The parameter is named filter but you're attempting to use selector which is undefined.
Apply this fix:
-setFilter: (filter: string) => setParams({ selector: selector }),
+setFilter: (filter: string) => setParams({ selector: filter }),📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| setFilter: (filter: string) => setParams({ selector: selector }), | |
| setFilter: (filter: string) => setParams({ selector: filter }), |
...)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/page.tsx
Outdated
Show resolved
Hide resolved
...ents/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx
Outdated
Show resolved
Hide resolved
...ystemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/EditDeploymentSection.tsx
Outdated
Show resolved
Hide resolved
| const getFilter = (resourceId: string, deploymentId: string): JobCondition => { | ||
| const resourceFilter: JobCondition = { | ||
| type: JobFilterType.JobResource, | ||
| const resourceSelector: JobCondition = { | ||
| type: JobSelectorType.JobResource, | ||
| operator: ColumnOperator.Equals, | ||
| value: resourceId, | ||
| }; | ||
|
|
||
| const deploymentFilter: JobCondition = { | ||
| type: JobFilterType.Deployment, | ||
| type: JobSelectorType.Deployment, | ||
| operator: ColumnOperator.Equals, | ||
| value: deploymentId, | ||
| }; | ||
|
|
||
| return { | ||
| type: FilterType.Comparison, | ||
| type: SelectorType.Comparison, | ||
| operator: ComparisonOperator.And, | ||
| conditions: [resourceFilter, deploymentFilter], | ||
| conditions: [resourceSelector, deploymentFilter], | ||
| }; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Inconsistent naming: Function and variable names still use "filter" terminology
For consistency with the "filter" to "selector" renaming effort:
- The function
getFiltershould be renamed togetSelector - The variable
deploymentFilteron line 37 should be renamed todeploymentSelector
This ensures naming consistency with the updated type system where FilterType and JobFilterType have been renamed to SelectorType and JobSelectorType.
-const getFilter = (resourceId: string, deploymentId: string): JobCondition => {
+const getSelector = (resourceId: string, deploymentId: string): JobCondition => {
const resourceSelector: JobCondition = {
type: JobSelectorType.JobResource,
operator: ColumnOperator.Equals,
value: resourceId,
};
- const deploymentFilter: JobCondition = {
+ const deploymentSelector: JobCondition = {
type: JobSelectorType.Deployment,
operator: ColumnOperator.Equals,
value: deploymentId,
};
return {
type: SelectorType.Comparison,
operator: ComparisonOperator.And,
- conditions: [resourceSelector, deploymentFilter],
+ conditions: [resourceSelector, deploymentSelector],
};
};📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const getFilter = (resourceId: string, deploymentId: string): JobCondition => { | |
| const resourceFilter: JobCondition = { | |
| type: JobFilterType.JobResource, | |
| const resourceSelector: JobCondition = { | |
| type: JobSelectorType.JobResource, | |
| operator: ColumnOperator.Equals, | |
| value: resourceId, | |
| }; | |
| const deploymentFilter: JobCondition = { | |
| type: JobFilterType.Deployment, | |
| type: JobSelectorType.Deployment, | |
| operator: ColumnOperator.Equals, | |
| value: deploymentId, | |
| }; | |
| return { | |
| type: FilterType.Comparison, | |
| type: SelectorType.Comparison, | |
| operator: ComparisonOperator.And, | |
| conditions: [resourceFilter, deploymentFilter], | |
| conditions: [resourceSelector, deploymentFilter], | |
| }; | |
| }; | |
| const getSelector = (resourceId: string, deploymentId: string): JobCondition => { | |
| const resourceSelector: JobCondition = { | |
| type: JobSelectorType.JobResource, | |
| operator: ColumnOperator.Equals, | |
| value: resourceId, | |
| }; | |
| const deploymentSelector: JobCondition = { | |
| type: JobSelectorType.Deployment, | |
| operator: ColumnOperator.Equals, | |
| value: deploymentId, | |
| }; | |
| return { | |
| type: SelectorType.Comparison, | |
| operator: ComparisonOperator.And, | |
| conditions: [resourceSelector, deploymentSelector], | |
| }; | |
| }; |
packages/emails/src/client/env.js
Outdated
| server: { | ||
| SMTP_HOST: z.string(), | ||
| SMTP_PORT: z.coerce.number().default(587), | ||
| SMTP_USER: z.string(), | ||
| SMTP_PASS: z.string(), | ||
| SMTP_FROM: z.string(), | ||
| SMTP_SECURE: z.coerce.boolean().default(false), | ||
| }, | ||
| runtimeEnv: process.env, | ||
| skipValidation: !!process.env.CI || | ||
| !!process.env.SKIP_ENV_VALIDATION || | ||
| process.env.npm_lifecycle_event === "lint", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should revert
packages/emails/src/client/index.js
Outdated
| host: env.SMTP_HOST, | ||
| port: env.SMTP_PORT, | ||
| secure: env.SMTP_SECURE, | ||
| auth: { | ||
| user: env.SMTP_USER, | ||
| pass: env.SMTP_PASS, | ||
| }, | ||
| }); | ||
| export const sendEmail = (payload) => { | ||
| return transporter.sendMail({ from: env.SMTP_FROM, ...payload }); | ||
| return transporter.sendMail({ from: env.SMTP_FROM, ...payload }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should revert
packages/emails/tailwind.config.js
Outdated
| theme: { | ||
| extend: { | ||
| colors: { | ||
| sidebar: { | ||
| DEFAULT: "hsl(var(--sidebar-background))", | ||
| foreground: "hsl(var(--sidebar-foreground))", | ||
| primary: "hsl(var(--sidebar-primary))", | ||
| "primary-foreground": "hsl(var(--sidebar-primary-foreground))", | ||
| accent: "hsl(var(--sidebar-accent))", | ||
| "accent-foreground": "hsl(var(--sidebar-accent-foreground))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spacing
packages/db/src/schema/resource.ts
Outdated
| name: text("name").notNull(), | ||
| description: text("description").default(""), | ||
| filter: jsonb("filter").notNull().$type<ResourceCondition>(), | ||
| selector: jsonb("selector").notNull().$type<ResourceCondition>(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still a filter because its a saved filter
| </PopoverTrigger> | ||
| <PopoverContent className="w-[462px] p-0"> | ||
| <Command shouldFilter={false}> | ||
| <Command shouldSelector={false}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, maybe we should call this shouldSelect.
We don't have to do this as it would not be as grepable.
6d24193 to
f995e26
Compare
| resourceFilter: false, | ||
| }); | ||
|
|
||
| const envsWithFilter = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
envWithSelector
| className="rounded-none rounded-t-lg border-none hover:ring-0 focus-visible:ring-0" | ||
| type="text" | ||
| placeholder="Filter variables..." | ||
| placeholder="Selector variables..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Search variables..."
| <Link | ||
| className="flex h-full items-center gap-2 border-l border-neutral-800 pl-6" | ||
| href={`${workspaceUrls.resources().baseUrl()}?filter=${v.filterHash}`} | ||
| href={`${workspaceUrls.resources().baseUrl()}?condition=${v.filterHash}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldmake sure all the components take into account the param change
| environment: SCHEMA.Environment; | ||
| workspaceId: string; | ||
| }> = ({ environment, workspaceId }) => { | ||
| const allResourcesQ = useFilteredResources( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing actionable, just wondering - what would be the verb here? "use____Resources" useSelectedResources?
| onValueChange={(value) => { | ||
| if (value === "all") { | ||
| handleFilterDropdownChange(value, ResourceFilterType.Kind); | ||
| handleFilterDropdownChange( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handleSelectorDropdownChange
| filter, | ||
| sort, | ||
| setFilter: (filter: string) => setParams({ filter }), | ||
| setFilter: (filter: string) => setParams({ filter: filter }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray change I think
| ); | ||
| }; | ||
|
|
||
| const getFilter = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be above where it is declared
| example: 60, | ||
| }, | ||
| resourceFilter: { | ||
| resourceSelector: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should make these endpoints backwards compatible
| @@ -0,0 +1 @@ | |||
| ALTER TABLE "resource_view" RENAME COLUMN "selector" TO "filter"; No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, should we just squash these into one
…thub.com/wandb/ctrlplane into j7m4/refactor-release-filter-to-selector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (8)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts (1)
58-58: Simplify destructuring assignment.The current destructuring creates a useless rename where the variable name is the same on both sides of the assignment.
- const { resourceSelector: resourceSelector } = form.watch(); + const { resourceSelector } = form.watch();🧰 Tools
🪛 Biome (1.9.4)
[error] 58-58: Useless rename.
Safe fix: Remove the renaming.
(lint/complexity/noUselessRename)
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/views/ResourceViewsTable.tsx (1)
31-31: Consider updating TableHead label for consistencyWhile the URL parameter has been updated to use "condition", the TableHead still displays "Filter" as the column label. Consider updating this for consistency with the new terminology.
- <TableHead>Filter</TableHead> + <TableHead>Condition</TableHead>apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/SystemsPageContent.tsx (1)
83-83: Consider using object property shorthand.You could simplify
setCondition: (condition: string) => setParams({ condition: condition })tosetCondition: (condition: string) => setParams({ condition }).- setCondition: (condition: string) => setParams({ condition: condition }), + setCondition: (condition: string) => setParams({ condition }),apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceCondition.ts (1)
1-76: Consider adding JSDoc comments to the hook.While the code is well-structured, adding JSDoc comments to describe the purpose of the hook, its parameters, and return values would improve maintainability and help other developers understand its usage.
+/** + * Hook to manage resource conditions via URL parameters. + * Handles parsing/serializing conditions to/from URL and provides search functionality. + * + * @returns {Object} Object containing condition state and related functions + * @returns {ResourceCondition|null} condition - The current resource condition parsed from URL + * @returns {Function} setCondition - Function to update the condition in the URL + * @returns {string|null} viewId - The current view ID from URL parameters + * @returns {string} search - The current search term + * @returns {Function} setSearch - Function to update the search term + */ export const useResourceCondition = () => {packages/job-dispatch/src/deployment-update.ts (4)
45-46: Refine naming forhasFilter
Switching fromresourceFiltertoresourceSelectoris aligned with the PR objectives. However, consider renaminghasFilterto something likehasSelectorto maintain naming consistency throughout the code.- const hasFilter = isNotNull(SCHEMA.environment.resourceSelector); + const hasSelector = isNotNull(SCHEMA.environment.resourceSelector);
55-55: Clarify local naming
Although referencingresourceSelector, the local variable is calledfilters. For clarity, consider renaming it toselectors:- const filters = newSystem.environments - .map((env) => env.resourceSelector) - .filter(isPresent); + const selectors = newSystem.environments + .map((env) => env.resourceSelector) + .filter(isPresent);
196-199: Ensure deep comparison logic is appropriate
_.isEqualproperly compares complex objects, so it should suffice here for identifying actual changes toresourceSelector. You may wish to renamehandleDeploymentFilterChangedto reflect the updated “selector” terminology for clarity.
203-203: Consider updating method name for full consistency
The call tohandleDeploymentFilterChangedis passing a selector, which might be confusing. Consider renaming the function to match the new terminology:-const handleDeploymentFilterChanged = async ( +const handleDeploymentSelectorChanged = async ( deployment: SCHEMA.Deployment, prevFilter: ResourceCondition | null, userId?: string, ) => { ... }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (69)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/DeploymentPageContent.tsx(4 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/DeploymentVersionEnvironmentCell.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/JobHistoryPopover.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/channels/CreateDeploymentVersionChannelDialog.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/DeploymentResourcesDialog.tsx(5 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/EditDeploymentSection.tsx(7 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/ConfigFields.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableTable.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/page.tsx(4 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/variable-data.ts(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/ResourcesPageContent.tsx(14 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useFilteredResources.ts(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/deployments/TableDeployments.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/_components/variables/VariableResourceInput.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/SystemsPageContent.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/_components/system-deployment-table/TableDeployments.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/DeploymentVersionChannelDropdown.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/DeploymentResourceDrawer.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/TableRow.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/version/condition/DeploymentVersionConditionDialog.tsx(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsx(4 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobComparisonConditionRender.tsx(12 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobResourceConditionRender.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/RunbookJobComparisonConditionRender.tsx(8 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ComparisonConditionRender.tsx(13 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ResourceViewActionsDropdown.tsx(4 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceCondition.ts(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/channel/useDeploymentVersionChannel.ts(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useCondition.ts(1 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/insights/DailyJobsChart.tsx(4 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/SidebarKinds.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/groupings/[groupId]/CombincationsTable.tsx(3 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx(8 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/providers/page.tsx(2 hunks)apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/views/ResourceViewsTable.tsx(1 hunks)apps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/openapi.ts(1 hunks)openapi.v1.json(7 hunks)packages/api/src/router/deployment-variable.ts(9 hunks)packages/api/src/router/deployment-version.ts(5 hunks)packages/api/src/router/environment-page/deployments/deployment-stats.ts(2 hunks)packages/api/src/router/environment-page/overview/router.ts(4 hunks)packages/api/src/router/environment-page/resources/router.ts(2 hunks)packages/api/src/router/environment-stats.ts(2 hunks)packages/api/src/router/environment.ts(4 hunks)packages/api/src/router/job.ts(2 hunks)packages/api/src/router/system.ts(2 hunks)packages/db/drizzle/0080_cuddly_mantis.sql(1 hunks)packages/db/drizzle/meta/_journal.json(1 hunks)packages/db/src/schema/deployment.ts(2 hunks)packages/db/src/schema/environment.ts(2 hunks)packages/db/src/schema/job.ts(3 hunks)packages/db/src/schema/resource.ts(2 hunks)packages/job-dispatch/src/deployment-update.ts(5 hunks)packages/job-dispatch/src/environment-release-channel-update.ts(2 hunks)packages/job-dispatch/src/events/triggers/deployment-removed.ts(1 hunks)packages/job-dispatch/src/events/triggers/environment-deleted.ts(2 hunks)packages/job-dispatch/src/events/triggers/resource-deleted.ts(2 hunks)packages/job-dispatch/src/release-job-trigger.ts(2 hunks)packages/job-dispatch/src/resource/dispatch-resource.ts(2 hunks)packages/validators/src/conditions/index.ts(1 hunks)packages/validators/src/jobs/conditions/job-condition.ts(3 hunks)packages/validators/src/resources/conditions/resource-condition.ts(5 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/db/drizzle/0080_cuddly_mantis.sql
🚧 Files skipped from review as they are similar to previous changes (58)
- packages/api/src/router/environment-page/resources/router.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/channels/CreateDeploymentVersionChannelDialog.tsx
- packages/validators/src/conditions/index.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/SidebarKinds.tsx
- packages/api/src/router/environment-stats.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/RunbookJobComparisonConditionRender.tsx
- packages/job-dispatch/src/release-job-trigger.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/variable-data.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/JobHistoryPopover.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/runbooks/_components/variables/VariableResourceInput.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableTable.tsx
- packages/api/src/router/environment-page/overview/router.ts
- apps/webservice/src/app/api/v1/workspaces/[workspaceId]/resources/[filter]/openapi.ts
- packages/db/src/schema/deployment.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/list/ResourcePageContent.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/Overview.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/TableRow.tsx
- packages/job-dispatch/src/resource/dispatch-resource.ts
- packages/job-dispatch/src/events/triggers/deployment-removed.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useFilteredResources.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/page.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/ConfigFields.tsx
- packages/job-dispatch/src/environment-release-channel-update.ts
- packages/validators/src/resources/conditions/resource-condition.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/_components/system-deployment-table/TableDeployments.tsx
- packages/job-dispatch/src/events/triggers/resource-deleted.ts
- packages/api/src/router/system.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/TableCells.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/channel/useDeploymentVersionChannel.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/_components/release-cell/DeploymentVersionEnvironmentCell.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/DeploymentPageContent.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/providers/page.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/resource-drawer/DeploymentResourceDrawer.tsx
- packages/api/src/router/deployment-variable.ts
- packages/db/src/schema/resource.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ComparisonConditionRender.tsx
- packages/api/src/router/environment.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/ResourceViewActionsDropdown.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobComparisonConditionRender.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/environment/drawer/Filter.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/_components/job/condition/JobResourceConditionRender.tsx
- packages/db/src/schema/environment.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/jobs/release-table/ResourceReleaseTable.tsx
- packages/api/src/router/environment-page/deployments/deployment-stats.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/resources/(raw)/[resourceId]/deployments/ResourceDeploymentRow.tsx
- packages/api/src/router/deployment-version.ts
- packages/db/src/schema/job.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(sidebar)/deployments/TableDeployments.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/insights/DailyJobsChart.tsx
- packages/job-dispatch/src/events/triggers/environment-deleted.ts
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/variables/VariableResourceInput.tsx
- packages/db/drizzle/meta/_journal.json
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/ResourcesPageContent.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/DeploymentResourcesDialog.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(raw)/releases/[releaseId]/checks/_components/flow-diagram/EnvironmentNode.tsx
- apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/deployments/[deploymentSlug]/(sidebar)/properties/EditDeploymentSection.tsx
- packages/validators/src/jobs/conditions/job-condition.ts
- openapi.v1.json
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{ts,tsx}`: **Note on Error Handling:** Avoid strict enforcement of try/catch blocks. Code may use early returns, Promise chains (.then().catch()), or other patterns for error...
**/*.{ts,tsx}: Note on Error Handling:
Avoid strict enforcement of try/catch blocks. Code may use early returns, Promise chains (.then().catch()), or other patterns for error handling. These are acceptable as long as they maintain clarity and predictability.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/DeploymentVersionChannelDropdown.tsxapps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/groupings/[groupId]/CombincationsTable.tsxapps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/views/ResourceViewsTable.tsxpackages/api/src/router/job.tsapps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useCondition.tspackages/job-dispatch/src/deployment-update.tsapps/webservice/src/app/[workspaceSlug]/(app)/_components/deployments/version/condition/DeploymentVersionConditionDialog.tsxapps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceCondition.tsapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/SystemsPageContent.tsxapps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts
🧬 Code Definitions (2)
packages/api/src/router/job.ts (1)
packages/validators/src/jobs/conditions/job-condition.ts (1)
jobCondition(41-51)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts (3)
packages/validators/src/resources/conditions/resource-condition.ts (3)
ResourceCondition(27-36)isComparisonCondition(76-79)resourceCondition(38-48)packages/validators/src/jobs/conditions/job-condition.ts (1)
isComparisonCondition(72-75)packages/db/src/schema/environment.ts (1)
environment(49-74)
🪛 Biome (1.9.4)
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts
[error] 58-58: Useless rename.
Safe fix: Remove the renaming.
(lint/complexity/noUselessRename)
🔇 Additional comments (28)
packages/api/src/router/job.ts (1)
397-398: Consistent renaming of filter to condition.The parameter in the input schema and its corresponding usage in the query have been correctly updated from
filtertocondition. This change aligns with the PR objective to refactor filter terminology to condition/selector throughout the codebase.Also applies to: 423-424
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/groupings/[groupId]/CombincationsTable.tsx (2)
17-18: Good addition of the constant for improved maintainability.Defining
CONDITION_PARAMas a constant rather than using hardcoded strings is a good practice that makes the code more maintainable. This aligns with the PR's objective of renaming "filter" to "condition" throughout the codebase.
45-60: Consistent renaming from "filter" to "condition" terminology.The renaming of
filterHashtoconditionHashand the use of theCONDITION_PARAMconstant for the URL parameter is consistent with the PR objective. This change properly maintains the functionality while updating the terminology across the codebase.apps/webservice/src/app/[workspaceSlug]/(app)/_components/channel/drawer/DeploymentVersionChannelDropdown.tsx (2)
26-27: Good improvement: Added a constant for URL parameter.Using a named constant instead of a magic string improves code maintainability and readability. This aligns with the PR objective of replacing "filter" terminology with "condition" throughout the codebase.
44-44: Correctly updated URL parameter handling.The code now uses the
CONDITION_PARAMconstant instead of the hardcoded "filter" string, maintaining consistency with the broader refactoring effort in the PR.Make sure that any bookmarked URLs or external systems using the old "filter" parameter will still work or are properly redirected to use the new "condition" parameter.
apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(raw)/systems/[systemSlug]/(raw)/environments/[environmentId]/resources/_hooks/useEnvResourceEditor.ts (1)
10-10: LGTM: Filter to condition/selector renaming is consistent.The renaming from "filter" to "condition" and "selector" terminology has been implemented consistently throughout this file, matching the changes made across the codebase. All variable names, type references, and function parameters have been updated appropriately.
Also applies to: 20-30, 34-34, 54-54, 63-63
apps/webservice/src/app/[workspaceSlug]/(app)/resources/(sidebar)/views/ResourceViewsTable.tsx (2)
42-42: Query parameter correctly updated from "filter" to "condition"The URL query parameter has been updated to use "condition" instead of "filter", which aligns with the broader refactoring effort to standardize terminology across the codebase.
50-50: Property name inconsistencyThe component is called
ResourceConditionBadgeand usesconditionas prop name, but it receivesview.filteras the value. This suggests the data structure still uses the old naming convention. This might be expected during a multi-step refactoring, but it creates a semantic inconsistency.Consider verifying if the
filterproperty in theviewobject should also be renamed toconditionfor complete consistency, or if this is intentionally left for backward compatibility.apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/SystemsPageContent.tsx (7)
51-52: LGTM: Good constant naming.The constant name
CONDITION_PARAMaccurately reflects the refactoring from "filter" to "condition" terminology.
53-57: LGTM: Hook renamed appropriately.The hook has been correctly renamed from
useSystemFiltertouseSystemCondition, and the internal variable has been updated fromfiltertocondition.
59-69: LGTM: Parameter handling updated consistently.The
setParamsfunction has been updated to handle the "condition" parameter instead of "filter", with consistent implementation for setting and deleting URL parameters.
80-86: LGTM: Return values updated correctly.The hook's return object has been properly updated to return
conditioninstead offilter, and the setter method has been renamed tosetCondition.
92-94: LGTM: Component updated to use new hook.The component is now correctly using
useSystemConditionand destructuringconditionandsetCondition.
95-102: LGTM: Effect dependencies updated properly.The effect's dependencies and logic have been updated to use
conditionandsetConditioninstead of their "filter" counterparts.
105-108: LGTM: API query parameter updated.The API query parameter has been correctly updated to use
conditioninstead offilter.apps/webservice/src/app/[workspaceSlug]/(app)/_components/resources/condition/useResourceCondition.ts (6)
9-10: Good use of constants to improve maintainability.Creating a constant for "condition" parameter name helps avoid magic strings and makes the code more maintainable.
11-11: Hook renamed to reflect "condition" terminology.The hook name has been appropriately updated as part of the systematic renaming from "filter" to "condition" throughout the codebase.
16-26: Logic updated to use condition parameter with proper error handling.The useMemo implementation correctly retrieves and parses the condition parameter from the URL with appropriate null checks and error handling.
30-48: URL manipulation function properly renamed and updated.The callback function for setting conditions in the URL has been updated with consistent naming and maintains all the existing functionality.
53-69: Search functionality correctly updated to use condition terminology.The debounced search handler has been properly updated to use the new "condition" terminology while maintaining the same functionality.
75-75: Return value updated to reflect the new terminology.The hook's return object now correctly uses "condition" terminology while maintaining the same structure and functionality.
apps/webservice/src/app/[workspaceSlug]/(app)/_hooks/useCondition.ts (2)
7-45: Great implementation of the useCondition hook!This is a well-structured hook with proper type safety using generics, efficient memoization with
useMemoanduseCallback, and good error handling throughout the parsing and compression processes. The renaming from "filter" to "condition/selector" aligns well with the PR objectives.
5-5: Verify terminology consistency across codebase.The constant
CONDITION_PARAMis set to "selector" which seems to mix the terminology being used. According to the PR objectives, you're refactoring from "filter" to "selector" or "condition", but the hook is nameduseConditionwhile the parameter is named "selector".Please verify this is intentional and consistent with the naming strategy across the codebase. If the hook is named
useCondition, typically the parameter would be named "condition" as well.packages/job-dispatch/src/deployment-update.ts (5)
11-11: Consistent rename toConditionType
No issues found. This alignment fromFilterTypetoConditionTypeadheres to the new naming convention and appears correct.
61-61: Good update toConditionType.Comparison
This update correctly reflects the transitioning terminology without further issues.
112-114: Rename from filter to selector is consistent
UsingresourceSelectorin the conditions array aligns well with the PR objective to shift from filters to selectors. No concerns here.
118-118: Proper use ofConditionType.Comparison
This modification is consistent with your new naming scheme.
124-126: Consistent naming in new resources filter
The object now referencesConditionType.Comparisonand uses the renamedresourceSelectorproperty correctly.
| const selector = localCondition ?? undefined; | ||
| const versionsQ = api.deployment.version.list.useQuery( | ||
| { deploymentId: deploymentId ?? "", selector, limit: 5 }, | ||
| { deploymentId: deploymentId ?? "", filter: selector, limit: 5 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent parameter naming with PR objective.
The PR objective is to replace "filter" terminology with "condition" or "selector", but this line is doing the opposite by using filter as the parameter name while the variable being passed is named selector. This contradicts the broader refactoring effort.
Change the parameter name from filter to selector to maintain consistency with the refactoring:
- { deploymentId: deploymentId ?? "", filter: selector, limit: 5 },
+ { deploymentId: deploymentId ?? "", selector: selector, limit: 5 },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { deploymentId: deploymentId ?? "", filter: selector, limit: 5 }, | |
| { deploymentId: deploymentId ?? "", selector: selector, limit: 5 }, |
| try { | ||
| if (condition == null) { | ||
| url.searchParams.delete(CONDITION_PARAM); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing router update when clearing the condition.
When condition is null, the code removes the parameter but returns early without calling router.replace(). This will cause the URL to not update when clearing a condition.
if (condition == null) {
url.searchParams.delete(CONDITION_PARAM);
- return;
+ router.replace(`${url.pathname}?${url.searchParams.toString()}`);
+ return;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| try { | |
| if (condition == null) { | |
| url.searchParams.delete(CONDITION_PARAM); | |
| return; | |
| } | |
| try { | |
| if (condition == null) { | |
| url.searchParams.delete(CONDITION_PARAM); | |
| router.replace(`${url.pathname}?${url.searchParams.toString()}`); | |
| return; | |
| } |
Summary by CodeRabbit