Skip to content

feat(desktop): Recently Viewed section in v2 Quick Open#3488

Merged
saddlepaddle merged 1 commit into
mainfrom
bedecked-clownfish
Apr 15, 2026
Merged

feat(desktop): Recently Viewed section in v2 Quick Open#3488
saddlepaddle merged 1 commit into
mainfrom
bedecked-clownfish

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Apr 15, 2026

Summary

  • Adds a Recently Viewed section pinned above the fuzzy results in the v2 workspace command palette (Cmd+P / Quick Open).
  • Tracks files the user explicitly opens (Quick Open or sidebar). Files currently open in a tab are sorted to the top of the section.
  • Persists per-workspace via the existing v2WorkspaceLocalState localStorage collection — store cap 25, display cap 10.
  • Empty-query state shows only the Recently Viewed section (with a muted empty-row when nothing is recorded yet). Non-empty queries substring-match the recents to the top, with a separator before the fuzzy results, and dedupe recents out of the fuzzy list.
  • Extracts the duplicated row markup into a shared FileResultItem component.

Test plan

  • Open the v2 workspace command palette with no entries → "Recently Viewed" heading + "No recently viewed files yet" row.
  • Open a few files via Quick Open → reopen palette empty-query → those files appear in the section, MRU first.
  • Open files in tabs, then open more unrelated files → reopen palette → tab files stay above other recents.
  • Type "pack" with package.json recently viewed → it appears once under the heading and is removed from the fuzzy list below the separator.
  • Relaunch the desktop app → Recently Viewed list persists.
  • Open a gitignored file (e.g. .env.local) via the sidebar → it appears in Recently Viewed (spec: views are kept regardless of gitignore).

Summary by CodeRabbit

  • New Features
    • Recently viewed files now appear in the command palette, prioritizing currently open files for quick access.
    • The app automatically records file accesses and shows up to 10 recent items alongside search results.
    • Search results are deduplicated against recent items for a cleaner navigation list.
    • Improved command palette item layout and selection behavior for recent and search results.

Summary by cubic

Adds a Recently Viewed section to the v2 Quick Open (Cmd+P). It shows your last opened files at the top, prefers files currently open, and persists per workspace.

  • New Features

    • Records file opens from Quick Open and the sidebar; stores up to 25 and shows up to 10.
    • Empty query shows only recents; typed queries filter recents, separate them from fuzzy results, and dedupe duplicates.
  • Refactors

    • Added useRecentlyViewedFiles and recentlyViewedFiles in v2WorkspaceLocalState.
    • Extracted a shared FileResultItem for the file row UI.

Written for commit c86af4e. Summary will update on new commits.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Adds a "recently viewed files" feature: constants, a hook, schema field, page integration to record views, and CommandPalette UI changes to show and dedupe recent files alongside search results.

Changes

Cohort / File(s) Summary
Constants & Barrel Export
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/constants.ts, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/index.ts
Introduced RECENT_STORE_LIMIT = 25 and RECENT_DISPLAY_LIMIT = 10; added public re-exports for constants, hook, and related types.
Recently Viewed Hook
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/useRecentlyViewedFiles.ts
New useRecentlyViewedFiles(workspaceId) hook exposing recentFiles and recordView; subscribes to local workspace state and updates recentlyViewedFiles with deduplication and store-size truncation.
Local State Schema
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
Added recentlyViewedFiles array field to workspaceLocalStateSchema with objects { relativePath, absolutePath, lastAccessedAt } and default [].
Workspace Page Integration
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx
Fetches worktreePath, integrates useRecentlyViewedFiles, calls recordView when opening files (computes relative/absolute paths), computes openFilePaths set, and passes recentFiles/openFilePaths to CommandPalette.
CommandPalette Changes
apps/desktop/src/renderer/screens/main/components/CommandPalette/CommandPalette.tsx
Added optional props recentlyViewedFiles and openFilePaths; implemented recent-files pipeline (grouping open vs rest, filtering, deduplication against search results, capped by display limit), renders "Recently Viewed" section and uses FileResultItem for items.
File Result Item Component
apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/FileResultItem.tsx, apps/desktop/src/renderer/.../FileResultItem/index.ts
New FileResultItem component and barrel export for consistent rendering of file entries in the CommandPalette.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CommandPalette
    participant Page
    participant Hook as useRecentlyViewedFiles
    participant CollectionsDB as Collections

    User->>CommandPalette: open / search / select file
    CommandPalette->>Page: request openFilePane(filePath)
    Page->>Hook: recordView({ relativePath, absolutePath })
    Hook->>CollectionsDB: read workspaceLocalState(rows) for workspaceId
    CollectionsDB-->>Hook: return draft (or none)
    Hook->>CollectionsDB: write updated recentlyViewedFiles (dedupe, prepend, slice)
    CollectionsDB-->>Hook: ack
    Hook-->>Page: (no return) 
    Page->>CommandPalette: open tab / update UI
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰
I hopped through code to mark each trail,
Twenty-five stored, ten shown without fail,
A nibble, a tap — a file in view,
CommandPalette hums, the slate feels new,
Hooray for quick hops and shortcuts too! ✨

🚥 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 feature: adding a Recently Viewed section to the v2 Quick Open command palette in the desktop application.
Description check ✅ Passed The description is comprehensive and complete, covering summary, test plan, and implementation details, though it lacks explicit GitHub issue links and specific testing status.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bedecked-clownfish

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 15, 2026

Greptile Summary

This PR adds a Recently Viewed section to the v2 Quick Open palette (Cmd+P), persisting file access history per-workspace via the existing v2WorkspaceLocalState localStorage collection, and extracts the shared file-row markup into a reusable FileResultItem component.

Key changes:

  • New useRecentlyViewedFiles hook reads/writes an array of { relativePath, absolutePath, lastAccessedAt } objects from TanStack DB, capped at 25 stored / 10 displayed entries.
  • workspaceLocalStateSchema extended with a recentlyViewedFiles field (safe default([])).
  • openFilePane in page.tsx calls recordView on every file open (Quick Open and sidebar), using toAbsoluteWorkspacePath / toRelativeWorkspacePath to normalise paths.
  • CommandPalette orders open-tab files above other recents, substring-filters the section on non-empty queries, deduplicates recents out of the fuzzy results list, and renders an empty-state row when history is blank.
  • biome.jsonc gains "root": false — this is unrelated to the feature and may be unintentional (see inline comment).

Confidence Score: 4/5

Safe to merge — core feature logic is correct, persistence is non-destructive, and all edge cases (empty state, dedup, open-tab ordering) are handled.

The feature is well-structured: the hook, schema extension, and palette rendering logic are all sound. No data-loss or correctness bugs were found. The remaining issues are all style/P2: a redundant itemKey prop in FileResultItem, a variable name that shadows a component prop, a redundant filter predicate, and an unrelated "root": false in biome.jsonc that warrants a quick look before merging.

biome.jsonc (unrelated "root": false change) and CommandPalette.tsx (minor naming/logic cleanups).

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/useRecentlyViewedFiles.ts New hook that reads/writes recentlyViewedFiles from v2WorkspaceLocalState via TanStack DB live query; deduplicates on relativePath and caps the store at 25 entries — logic is correct.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx Adds workspaceTrpc.workspace.get query, derives openFilePaths from the pane store, hooks up recordView in openFilePane and threads both through to CommandPalette; logic is sound, though worktreePath loading state means views opened before the query resolves are silently dropped.
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts Adds recentlyViewedFiles array (with relativePath, absolutePath, lastAccessedAt) to workspaceLocalStateSchema with a safe default([]) — clean schema extension.
apps/desktop/src/renderer/screens/main/components/CommandPalette/CommandPalette.tsx Adds v2 Recently Viewed section with ordering, filtering, deduplication, and empty-state logic; minor issues: open variable shadows the prop of the same name, and the getFileName check in filteredRecent is a subset of the path check.
apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/FileResultItem.tsx Extracts the shared file row into a reusable component; the itemKey prop is passed to an inner reconciliation attribute unnecessarily — since it is the sole child, the hint is a no-op.
biome.jsonc Adds "root": false to the repository-root Biome config, which tells Biome to look further up the directory tree for a parent config; this is unrelated to the feature and likely unintentional.

Sequence Diagram

sequenceDiagram
    participant User
    participant Page as page.tsx
    participant Hook as useRecentlyViewedFiles
    participant Store as v2WorkspaceLocalState
    participant Palette as CommandPalette

    User->>Page: Open file (Quick Open / Sidebar)
    Page->>Hook: recordView({ relativePath, absolutePath })
    Hook->>Store: update(workspaceId, draft => prepend + slice(25))
    Store-->>Hook: live query update
    Hook-->>Page: recentFiles[]

    User->>Page: Open Quick Open (Cmd+P)
    Page->>Palette: recentlyViewedFiles, openFilePaths
    Palette->>Palette: orderedRecent (open tabs first, cap 10)
    Palette->>Palette: filteredRecent (substring match on query)
    Palette->>Palette: dedupedResults (remove recents from fuzzy list)
    Palette-->>User: Recently Viewed section + fuzzy results
Loading

Reviews (1): Last reviewed commit: "feat(desktop): add Recently Viewed secti..." | Re-trigger Greptile

Comment on lines +65 to +78
const orderedRecent = useMemo<RecentFile[]>(() => {
if (!showRecentSection || !recentlyViewedFiles) return [];
const openSet = openFilePaths ?? new Set<string>();
const open: RecentFile[] = [];
const rest: RecentFile[] = [];
for (const file of recentlyViewedFiles) {
if (openSet.has(file.absolutePath)) {
open.push(file);
} else {
rest.push(file);
}
}
return [...open, ...rest].slice(0, RECENT_DISPLAY_LIMIT);
}, [showRecentSection, recentlyViewedFiles, openFilePaths]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Local open shadows the component's open prop

const open: RecentFile[] = [] on line 68 shadows the open: boolean prop accepted by CommandPalette. While it doesn't cause a runtime bug here (the outer open isn't needed inside this memo), the shadowing is a footgun — any future edit that needs to read the open prop inside this memo will silently get the array instead of the boolean.

Consider renaming the local variable for clarity:

Suggested change
const orderedRecent = useMemo<RecentFile[]>(() => {
if (!showRecentSection || !recentlyViewedFiles) return [];
const openSet = openFilePaths ?? new Set<string>();
const open: RecentFile[] = [];
const rest: RecentFile[] = [];
for (const file of recentlyViewedFiles) {
if (openSet.has(file.absolutePath)) {
open.push(file);
} else {
rest.push(file);
}
}
return [...open, ...rest].slice(0, RECENT_DISPLAY_LIMIT);
}, [showRecentSection, recentlyViewedFiles, openFilePaths]);
const orderedRecent = useMemo<RecentFile[]>(() => {
if (!showRecentSection || !recentlyViewedFiles) return [];
const openSet = openFilePaths ?? new Set<string>();
const openFiles: RecentFile[] = [];
const rest: RecentFile[] = [];
for (const file of recentlyViewedFiles) {
if (openSet.has(file.absolutePath)) {
openFiles.push(file);
} else {
rest.push(file);
}
}
return [...openFiles, ...rest].slice(0, RECENT_DISPLAY_LIMIT);
}, [showRecentSection, recentlyViewedFiles, openFilePaths]);

Comment on lines +80 to +90
const filteredRecent = useMemo<RecentFile[]>(() => {
if (!showRecentSection) return [];
if (!hasQuery) return orderedRecent;
const needle = trimmedQuery.toLowerCase();
return orderedRecent.filter((file) => {
return (
file.relativePath.toLowerCase().includes(needle) ||
getFileName(file.relativePath).toLowerCase().includes(needle)
);
});
}, [showRecentSection, hasQuery, trimmedQuery, orderedRecent]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Redundant getFileName check in filteredRecent

The second condition — getFileName(file.relativePath).toLowerCase().includes(needle) — is always a subset of the first — file.relativePath.toLowerCase().includes(needle). getFileName returns the last path segment, which is always a substring of the full relative path, so any needle that matches the filename will also match the full path. The second check can never be true when the first is false.

Suggested change
const filteredRecent = useMemo<RecentFile[]>(() => {
if (!showRecentSection) return [];
if (!hasQuery) return orderedRecent;
const needle = trimmedQuery.toLowerCase();
return orderedRecent.filter((file) => {
return (
file.relativePath.toLowerCase().includes(needle) ||
getFileName(file.relativePath).toLowerCase().includes(needle)
);
});
}, [showRecentSection, hasQuery, trimmedQuery, orderedRecent]);
const filteredRecent = useMemo<RecentFile[]>(() => {
if (!showRecentSection) return [];
if (!hasQuery) return orderedRecent;
const needle = trimmedQuery.toLowerCase();
return orderedRecent.filter((file) =>
file.relativePath.toLowerCase().includes(needle),
);
}, [showRecentSection, hasQuery, trimmedQuery, orderedRecent]);

Comment thread biome.jsonc Outdated
@@ -1,4 +1,5 @@
{
"root": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 "root": false at the repository root is likely unintentional

Setting "root": false tells Biome that this is not the root configuration file and that it should continue traversing parent directories looking for a root config. At the actual repository root there are no parent directories with a Biome config, so Biome will fall back to built-in defaults for anything not covered by this file.

This change appears unrelated to the Recently Viewed feature. Was this added intentionally? If not, it should be reverted — "root": true (or omitting the field entirely) is the expected value for a monorepo's top-level biome.jsonc.

Comment on lines +4 to +9
interface FileResultItemProps {
itemKey: string;
value: string;
fileName: string;
relativePath: string;
onSelect: () => void;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 itemKey prop adds unnecessary API surface

itemKey is passed straight through to a JSX attribute on the sole child element. Since CommandPrimitive.Item is the only thing this component renders, that reconciliation hint is a no-op — React only needs it to tell siblings apart, and there are no siblings here. The parent call sites already provide the correct reconciliation hints on the FileResultItem element itself.

Removing itemKey from FileResultItemProps and dropping its usage on CommandPrimitive.Item would simplify the component interface.

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (2)
apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/FileResultItem.tsx (1)

19-24: Remove redundant key prop inside component.

The key={itemKey} on line 21 has no effect - React's key prop only works when specified by the parent during iteration (e.g., in .map()). The parent in CommandPalette.tsx already provides the key when rendering <FileResultItem key={...} />.

🧹 Proposed cleanup
 	return (
 		<CommandPrimitive.Item
-			key={itemKey}
 			value={value}
 			onSelect={onSelect}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/FileResultItem.tsx`
around lines 19 - 24, Remove the redundant key prop from the FileResultItem
component JSX: inside FileResultItem (the render returning
CommandPrimitive.Item) delete the key={itemKey} attribute because React keys
must be set by the parent when mapping and the parent CommandPalette already
provides the key; keep value={value}, onSelect={onSelect} and other props intact
and verify no other logic depends on itemKey being passed as a React key.
apps/desktop/src/renderer/screens/main/components/CommandPalette/CommandPalette.tsx (1)

65-78: Variable shadowing: open shadows the component prop.

The local variable open (line 68) shadows the open prop (line 33), which can cause confusion when reading the code. Consider renaming to openFiles or inOpenTabs.

🧹 Proposed rename
 	const orderedRecent = useMemo<RecentFile[]>(() => {
 		if (!showRecentSection || !recentlyViewedFiles) return [];
 		const openSet = openFilePaths ?? new Set<string>();
-		const open: RecentFile[] = [];
+		const openFiles: RecentFile[] = [];
 		const rest: RecentFile[] = [];
 		for (const file of recentlyViewedFiles) {
 			if (openSet.has(file.absolutePath)) {
-				open.push(file);
+				openFiles.push(file);
 			} else {
 				rest.push(file);
 			}
 		}
-		return [...open, ...rest].slice(0, RECENT_DISPLAY_LIMIT);
+		return [...openFiles, ...rest].slice(0, RECENT_DISPLAY_LIMIT);
 	}, [showRecentSection, recentlyViewedFiles, openFilePaths]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/screens/main/components/CommandPalette/CommandPalette.tsx`
around lines 65 - 78, The local variable named "open" inside the useMemo in
orderedRecent shadows the component prop "open"; rename that local variable
(e.g., to openFiles or inOpenTabs) and update all references within the useMemo
block (where it is pushed and later spread into the returned array) so it no
longer conflicts with the prop, keeping the logic that builds openFiles/rest
from recentlyViewedFiles and returns [...openFiles, ...rest]. Ensure you only
change the local variable name and its references (inside orderedRecent) and
leave the prop "open" and other symbols (orderedRecent, recentlyViewedFiles,
openFilePaths, RECENT_DISPLAY_LIMIT) untouched.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@biome.jsonc`:
- Line 2: The Biome config currently sets "root": false which incorrectly marks
this as a nested config; edit the "root" setting in the file to be "root": true
(or remove the "root" field entirely to use Biome's default) so the
configuration is recognized as the repository root; locate the "root" key in the
shown JSONC and update its value accordingly.

---

Nitpick comments:
In
`@apps/desktop/src/renderer/screens/main/components/CommandPalette/CommandPalette.tsx`:
- Around line 65-78: The local variable named "open" inside the useMemo in
orderedRecent shadows the component prop "open"; rename that local variable
(e.g., to openFiles or inOpenTabs) and update all references within the useMemo
block (where it is pushed and later spread into the returned array) so it no
longer conflicts with the prop, keeping the logic that builds openFiles/rest
from recentlyViewedFiles and returns [...openFiles, ...rest]. Ensure you only
change the local variable name and its references (inside orderedRecent) and
leave the prop "open" and other symbols (orderedRecent, recentlyViewedFiles,
openFilePaths, RECENT_DISPLAY_LIMIT) untouched.

In
`@apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/FileResultItem.tsx`:
- Around line 19-24: Remove the redundant key prop from the FileResultItem
component JSX: inside FileResultItem (the render returning
CommandPrimitive.Item) delete the key={itemKey} attribute because React keys
must be set by the parent when mapping and the parent CommandPalette already
provides the key; keep value={value}, onSelect={onSelect} and other props intact
and verify no other logic depends on itemKey being passed as a React key.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6015c641-2e58-4373-868b-34ece946245f

📥 Commits

Reviewing files that changed from the base of the PR and between 9fff075 and 380c85d.

📒 Files selected for processing (9)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/constants.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useRecentlyViewedFiles/useRecentlyViewedFiles.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
  • apps/desktop/src/renderer/screens/main/components/CommandPalette/CommandPalette.tsx
  • apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/FileResultItem.tsx
  • apps/desktop/src/renderer/screens/main/components/CommandPalette/components/FileResultItem/index.ts
  • biome.jsonc

Comment thread biome.jsonc Outdated
@@ -1,4 +1,5 @@
{
"root": false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether multiple Biome configs exist in-repo and inspect root setting.
fd -HI '^biome\.jsonc$' .
echo "----"
rg -n '"root"\s*:\s*(true|false)' --glob '**/biome.jsonc'

Repository: superset-sh/superset

Length of output: 112


🌐 Web query:

Biome root configuration setting semantics documentation

💡 Result:

The "root" configuration setting in Biome's biome.json or biome.jsonc file determines whether the configuration file should be treated as a root configuration. By default, it is true, meaning any configuration file is considered a root. When set to true (default), the configuration is treated as a root. When a configuration file is intended as a "nested configuration" (e.g., in subdirectories or monorepos alongside other configs), it must explicitly set "root": false. Otherwise, Biome throws an error. This setting is required to allow Biome to properly orchestrate multiple configuration files simultaneously in CLI tools and editors, preventing conflicts during file scanning, linting, formatting, etc. Example for nested config: { "root": false } This applies to Biome's scanner, which discovers nested biome.json files and .gitignore files while respecting files.includes and ignore patterns.

Citations:


🏁 Script executed:

# Check if there are any biome configs in parent directories (outside the repo)
# This helps understand if the root: false setting could pick up external configs
# For now, just verify what the current repo structure looks like and confirm
# the biome.jsonc content around line 2

head -20 ./biome.jsonc

Repository: superset-sh/superset

Length of output: 417


Set "root": true to properly indicate this is the root Biome configuration.

At Line 2, "root": false indicates this is a nested configuration file (used in monorepos with multiple configs). Since the repository has a single Biome config at the root, set this to "root": true (Biome's default) to correctly indicate the configuration hierarchy.

Suggested change
-	"root": false,
+	"root": true,

(Or remove the field entirely to use Biome's default of "root": true.)

📝 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
"root": false,
"root": true,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@biome.jsonc` at line 2, The Biome config currently sets "root": false which
incorrectly marks this as a nested config; edit the "root" setting in the file
to be "root": true (or remove the "root" field entirely to use Biome's default)
so the configuration is recognized as the repository root; locate the "root" key
in the shown JSONC and update its value accordingly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app

Thank you for your contribution! 🎉

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="biome.jsonc">

<violation number="1" location="biome.jsonc:2">
P2: Setting the repository’s main `biome.jsonc` to `"root": false` makes config resolution non-isolated and can cause parent-directory Biome configs to leak into this project.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread biome.jsonc Outdated
@@ -1,4 +1,5 @@
{
"root": false,
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 15, 2026

Choose a reason for hiding this comment

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

P2: Setting the repository’s main biome.jsonc to "root": false makes config resolution non-isolated and can cause parent-directory Biome configs to leak into this project.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At biome.jsonc, line 2:

<comment>Setting the repository’s main `biome.jsonc` to `"root": false` makes config resolution non-isolated and can cause parent-directory Biome configs to leak into this project.</comment>

<file context>
@@ -1,4 +1,5 @@
 {
+	"root": false,
 	"$schema": "https://biomejs.dev/schemas/2.4.2/schema.json",
 	"vcs": {
</file context>
Suggested change
"root": false,
"root": true,
Fix with Cubic

Pins recently-opened files at the top of the v2 workspace command palette,
with currently-open tabs preferred. List is persisted per-workspace via
the existing v2WorkspaceLocalState localStorage collection (cap 25 stored,
10 displayed). Empty query shows only the section; non-empty query filters
recents by substring match and dedupes them out of the fuzzy results.

Extracts the duplicated row markup into a shared FileResultItem component.
@saddlepaddle saddlepaddle merged commit 86e0170 into main Apr 15, 2026
13 of 14 checks passed
MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 16, 2026
upstream (superset-sh#3488) adds Recently Viewed to the CommandPrimitive-based
palette, but fork ships a SearchDialog-based rewrite. Wire upstream's
useRecentlyViewedFiles hook and FileResultItem into the fork's dialog
so the feature actually works instead of being dead-imported.

SearchDialog gets two new optional props:
- preResultsSection: ReactNode rendered inside CommandList before
  results (for the "Recently Viewed" group + separator)
- hasPreResults: suppresses the empty state when the recent section
  has matches but the main results are empty

CommandPalette now computes orderedRecent / filteredRecent /
dedupedResults (same logic as upstream) and wires them through to
SearchDialog. Only active in workspace scope — global scope shows
only the flat cross-workspace result list.

v2 page passes recentFiles and openFilePaths (already being computed
for upstream's abandoned integration) into the palette.

Also rewrite FileResultItem to use the fork's wrapped CommandItem
instead of raw CommandPrimitive.Item — fork's @superset/ui/command
doesn't re-export CommandPrimitive.

SidebarHeader non-compact path now reuses the shared `btn` variable
via Fragment instead of duplicating the button element.
@Kitenite Kitenite deleted the bedecked-clownfish branch May 6, 2026 04:53
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