Skip to content

Config Listing Page: Show All Vector Stores in the Config Card Listing Page#34

Merged
Prajna1999 merged 2 commits intomainfrom
fix/fe-bugs
Feb 2, 2026
Merged

Config Listing Page: Show All Vector Stores in the Config Card Listing Page#34
Prajna1999 merged 2 commits intomainfrom
fix/fe-bugs

Conversation

@Prajna1999
Copy link
Copy Markdown
Collaborator

@Prajna1999 Prajna1999 commented Feb 2, 2026

Target issue #38
Earlier, in the config card listing page, tools and their corresponding vector store ids were not visible. It was creating issues for the user to ascertain which vector stores the config is taking in.

Summary by CodeRabbit

  • New Features
    • Added expandable Tools section displaying tool type, knowledge base count, and max results
    • Added expandable Vector Stores section showing all vector store IDs from configured tools in a compact list format

@Prajna1999 Prajna1999 requested a review from vprashrex February 2, 2026 05:51
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

A React component has been enhanced to display Tools and Vector Stores sections within ConfigCard. The update introduces state hooks to toggle visibility of Tools dropdown and a nested Vector Stores subsection, while aggregating knowledge base IDs from all configured tools for display.

Changes

Cohort / File(s) Summary
ConfigCard UI Enhancement
app/components/ConfigCard.tsx
Added useState hooks for Tools and Vector Stores toggle visibility. Introduced conditional rendering of Tools dropdown displaying tool types, knowledge base counts, and max results. Implemented aggregation of knowledge_base_ids across tools with conditional Vector Stores subsection rendering displaying IDs in monospace format.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 With toggles and drops, the config shines bright,
Tools peek from their drawer, Vector Stores take flight,
Knowledge bases gathered in one rabbit's sight,
Nested and tidy, each detail just right!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding Vector Stores visibility to the Config Card listing page, which directly matches the PR objectives.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fe-bugs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@app/components/ConfigCard.tsx`:
- Around line 148-151: The conditional rendering for tool.max_num_results
currently uses a truthy check which hides valid zero values; update the check in
ConfigCard (where it reads {tool.max_num_results && (...)}) to explicitly test
for null/undefined (e.g., tool.max_num_results != null or typeof
tool.max_num_results !== 'undefined') so that 0 is rendered correctly while
still omitting absent values.
🧹 Nitpick comments (1)
app/components/ConfigCard.tsx (1)

109-118: Use functional toggle updates and expose state via ARIA.
Functional updates prevent stale state in React's batching and concurrent rendering, and ARIA attributes improve accessibility for screen readers on collapsible sections.

✅ Suggested patch
-            <button
-              onClick={() => setShowTools(!showTools)}
+            <button
+              onClick={() => setShowTools(prev => !prev)}
+              aria-expanded={showTools}
+              aria-controls={`config-${latestVersion.config_id}-tools`}
               className="w-full flex items-center justify-between px-2.5 py-1.5 rounded-md text-xs transition-colors"
               style={{
                 backgroundColor: colors.bg.secondary,
                 border: `1px solid ${colors.border}`,
               }}
             >
@@
-            {showTools && (
-              <div
+            {showTools && (
+              <div
+                id={`config-${latestVersion.config_id}-tools`}
                 className="mt-1 p-2 rounded-md text-xs space-y-2"
                 style={{
                   backgroundColor: colors.bg.secondary,
                   border: `1px solid ${colors.border}`,
                 }}
               >
@@
-                      <button
-                        onClick={() => setShowVectorStores(!showVectorStores)}
+                      <button
+                        onClick={() => setShowVectorStores(prev => !prev)}
+                        aria-expanded={showVectorStores}
+                        aria-controls={`config-${latestVersion.config_id}-vector-stores`}
                         className="w-full flex items-center justify-between px-2 py-1 rounded-md transition-colors"
                         style={{
                           backgroundColor: colors.bg.primary,
                         }}
                       >
@@
-                      {showVectorStores && (
-                        <div
+                      {showVectorStores && (
+                        <div
+                          id={`config-${latestVersion.config_id}-vector-stores`}
                           className="mt-1 p-2 rounded-md space-y-1"
                           style={{
                             backgroundColor: colors.bg.primary,
                             color: colors.text.primary,
                           }}
                         >

Also applies to: 131-137, 165-174, 186-192

Comment on lines +148 to +151
{tool.max_num_results && (
<div style={{ color: colors.text.secondary }}>
Max Results: {tool.max_num_results}
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Render max_num_results when the value is 0.
The current truthy check hides valid zero values. Use a null/undefined check instead.

✅ Suggested patch
-                    {tool.max_num_results && (
+                    {tool.max_num_results != null && (
                       <div style={{ color: colors.text.secondary }}>
                         Max Results: {tool.max_num_results}
                       </div>
                     )}
📝 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.

Suggested change
{tool.max_num_results && (
<div style={{ color: colors.text.secondary }}>
Max Results: {tool.max_num_results}
</div>
{tool.max_num_results != null && (
<div style={{ color: colors.text.secondary }}>
Max Results: {tool.max_num_results}
</div>
)}
🤖 Prompt for AI Agents
In `@app/components/ConfigCard.tsx` around lines 148 - 151, The conditional
rendering for tool.max_num_results currently uses a truthy check which hides
valid zero values; update the check in ConfigCard (where it reads
{tool.max_num_results && (...)}) to explicitly test for null/undefined (e.g.,
tool.max_num_results != null or typeof tool.max_num_results !== 'undefined') so
that 0 is rendered correctly while still omitting absent values.

@Prajna1999 Prajna1999 merged commit 86b9f5d into main Feb 2, 2026
1 check passed
@Ayush8923 Ayush8923 deleted the fix/fe-bugs branch March 20, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant