-
Notifications
You must be signed in to change notification settings - Fork 193
feat: filter by namespace #2226
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
feat: filter by namespace #2226
Conversation
WalkthroughAdds a namespace-level match shortcut in the workspace command wrapper: if the filter text matches a namespace via Fuse, the whole namespace is added to results without per-item filtering. Also updates the search placeholder and no-match message. Existing per-namespace/graph/subgraph filtering remains for non-matching namespaces. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
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: 0
🧹 Nitpick comments (3)
studio/src/components/dashboard/workspace-command-wrapper.tsx (3)
50-56: Clone the namespace when short‑circuiting; also tighten Fuse typing and enable scores
- To keep consistency with the later cloning (Lines 58-61) and avoid accidental mutations by consumers, push a clone here.
- Use a precise Fuse generic and enable
includeScoreso the later manual sort onscore(Lines 87-89) is meaningful.Apply in-range change:
- fuse.setCollection([wns]); - if (fuse.search(filterValue).length > 0) { - // The namespace contains the filter value, add it with all the graphs/subgraphs to the search results - searchResults.push(wns); + fuse.setCollection([wns]); + if (fuse.search(filterValue).length > 0) { + // The namespace contains the filter value, add it with all the graphs/subgraphs to the search results + searchResults.push(wns.clone()); continue; }And (outside range) update the Fuse construction (Line 42):
- const fuse = new Fuse<unknown>([], { keys: ['name'], threshold: 0.3, }); + const fuse = new Fuse<WorkspaceNamespace | WorkspaceFederatedGraph | WorkspaceSubgraph>([], { + keys: ['name'], + threshold: 0.3, + includeScore: true, + });Please confirm that
GraphCommandGroupdoes not mutate thenamespaceobject; if it does, cloning here prevents side effects.
116-117: Minor copy tweak: pluralize and add Oxford commaImproves readability and matches the list below.
- placeholder="Search namespace, graphs and subgraphs" + placeholder="Search namespaces, graphs, and subgraphs"
123-123: Minor copy tweak: pluralize and subject‑verb agreementAligns grammar with list form and uses plural “match”.
- No namespace, graph or subgraph matches your criteria. + No namespaces, graphs, or subgraphs match your criteria.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
studio/src/components/dashboard/workspace-command-wrapper.tsx(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: build_test
- GitHub Check: build_push_image
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
Summary by CodeRabbit
Checklist