Repository navigation
Conversation
- add Settings > Appearance "Hidden files" pattern list, persisted per install - filter listings, refreshes and fs:events in the v2 FilesTab bridge - default to .git, node_modules and .DS_Store
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe desktop app supports configurable hidden file-tree patterns. Patterns are stored in local settings, edited in Appearance settings, and applied to workspace listings, search results, and filesystem events. ChangesFile-tree hidden patterns
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant FileTreeHiddenSection
participant SettingsRouter
participant LocalSettings
participant FilesView
participant useFilesTabBridge
User->>FileTreeHiddenSection: edit and save patterns
FileTreeHiddenSection->>SettingsRouter: setFileTreeHiddenPatterns
SettingsRouter->>LocalSettings: persist patterns
FilesView->>SettingsRouter: getFileTreeHiddenPatterns
SettingsRouter-->>FilesView: return patterns
FilesView->>FilesView: filter listings and search results
useFilesTabBridge->>useFilesTabBridge: filter workspace events and listings
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/hooks/useFilesTabBridge/useFilesTabBridge.ts (1)
388-396: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftCreate events for descendants of a hidden directory are not filtered.
isHiddentests only the entry's own path. It does not test ancestors.createFileTreeHiddenMatchercompares a slash-containing pattern against the entry's ownrelativePath, and a basename pattern against the entry's ownname.The initial-load path is safe because
fetchDirnever lists children of a directory it filtered out. Thecreateevent path is not safe, because the watcher reports each new path directly.Example with the default pattern
node_modules:
node_modules/is filtered at Line 390 and never entersknownPaths.- An install writes
node_modules/lodash/index.js.isHidden("node_modules/lodash/index.js", false)returnsfalse.addKnownPathadds the file. Pierre receives a path whose parent it does not know.The result is either hidden content that reappears in the tree, or a rejected
model.addthat thecatchat Line 451 swallows, which leavesknownPathsout of sync with the model. Package installs and build output make this reachable in normal use.Test each ancestor directory as well as the entry itself.
🐛 Proposed fix: test ancestors in `isHidden`
const isHidden = useCallback( - (rel: string, isDirectory: boolean) => - matcher({ - name: rel.split("/").pop() ?? "", - relativePath: rel, - isDirectory, - }), + (rel: string, isDirectory: boolean) => { + const segments = rel.split("/"); + // Test the entry itself, then every ancestor directory: a create + // event can arrive for a descendant of a directory we filtered out. + for (let depth = segments.length; depth > 0; depth -= 1) { + const candidate = segments.slice(0, depth).join("/"); + const candidateIsDirectory = + depth < segments.length ? true : isDirectory; + if ( + matcher({ + name: segments[depth - 1] ?? "", + relativePath: candidate, + isDirectory: candidateIsDirectory, + }) + ) { + return true; + } + } + return false; + }, [matcher], );Add a test in
apps/desktop/src/shared/file-tree-patterns.test.tsor a bridge-level test that asserts a descendant of a hidden directory stays hidden. Do you want me to open an issue to track this?🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/components/FilesTab/hooks/useFilesTabBridge/useFilesTabBridge.ts around lines 388 - 396, Update the create-event handling in useFilesTabBridge so hidden status is evaluated for the entry and every ancestor directory before calling addKnownPath or updating unloadedDirCandidatesRef. Reuse or extend isHidden/createFileTreeHiddenMatcher to walk ancestor paths, ensuring descendants such as node_modules/lodash/index.js remain filtered; add a regression test in the existing file-tree-patterns or bridge tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx`:
- Around line 30-35: Update FileTreeHiddenSection so the textarea no longer
persists through onBlur={commit}; rely on the button actions as the single
persistence path. Disable both action buttons while setPatterns.isPending to
prevent overlapping mutations, and add a regression test covering editing the
textarea followed by clicking Reset, ensuring only the reset/default patterns
are persisted.
---
Outside diff comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/components/WorkspaceSidebar/components/FilesTab/hooks/useFilesTabBridge/useFilesTabBridge.ts:
- Around line 388-396: Update the create-event handling in useFilesTabBridge so
hidden status is evaluated for the entry and every ancestor directory before
calling addKnownPath or updating unloadedDirCandidatesRef. Reuse or extend
isHidden/createFileTreeHiddenMatcher to walk ancestor paths, ensuring
descendants such as node_modules/lodash/index.js remain filtered; add a
regression test in the existing file-tree-patterns or bridge tests.
🪄 Autofix
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 Plus
Run ID: 35bc8980-cae9-4309-9274-383cd0d17eb4
📒 Files selected for processing (13)
apps/desktop/src/lib/trpc/routers/settings/index.tsapps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/FilesTab.tsxapps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/hooks/useFilesTabBridge/useFilesTabBridge.tsapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/AppearanceSettings.tsxapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsxapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/index.tsapps/desktop/src/renderer/routes/_authenticated/settings/utils/settings-search/settings-search.tsapps/desktop/src/shared/file-tree-patterns.test.tsapps/desktop/src/shared/file-tree-patterns.tspackages/local-db/drizzle/0046_add_file_tree_hidden_patterns.sqlpackages/local-db/drizzle/meta/0046_snapshot.jsonpackages/local-db/drizzle/meta/_journal.jsonpackages/local-db/src/schema/schema.ts
- match ancestors so watcher events under hidden directories stay hidden - wait for persisted patterns before the initial tree load - surface pattern validation failures to the user
There was a problem hiding this comment.
All reported issues were addressed
Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- filter lazy directory listings and search results in FilesView - invalidate legacy tree caches when hidden patterns change
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx`:
- Around line 258-264: Update the hiddenMatcher effect in FilesView to
invalidate every currently expanded directory instead of only the root item.
Reuse refreshVisibleDirectories(), or extract and call a shared invalidation
helper, while preserving the existing cache clearing and filesystem search
invalidation.
🪄 Autofix
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 Plus
Run ID: 474a2ea1-5923-4056-b57d-310a1f1d1f93
📒 Files selected for processing (1)
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
- drop conflicting blur auto-save and block edits during writes - reject oversized patterns before the mutation with visible feedback - keep the tree in a loading state until patterns resolve - reload every loaded directory when patterns change - build ancestor candidates without repeated slicing
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx`:
- Around line 84-101: Update FileTreeHiddenSection’s editor and Save/Reset
controls to remain disabled when the settings query is unavailable by including
isError || data === undefined alongside the existing loading checks. Add a
persistent load-error or retry state for that condition, while preserving normal
editing and saving when data is available.
🪄 Autofix
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 Plus
Run ID: fa7c72ee-7053-4d94-bd08-baa558b9f7ad
📒 Files selected for processing (4)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/FilesTab.tsxapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsxapps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsxapps/desktop/src/shared/file-tree-patterns.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- apps/desktop/src/shared/file-tree-patterns.ts
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/FilesTab.tsx
- apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/FilesView.tsx
- block editing, save and reset while the pattern query has no data - surface a load failure with a retry action
- drop the redundant name field now that ancestors are matched per segment
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx`:
- Around line 92-104: Add the `select-text cursor-text` classes to the
error-message span in `FileTreeHiddenSection`, preserving the existing styling
and retry button behavior.
- Around line 87-90: Update the mutation success flow associated with the editor
around setPatterns so it returns or awaits the query invalidate operation before
completing, keeping the editor disabled until refetch finishes. Add a regression
test that verifies edits made during the delayed refetch are not cleared by the
persisted-state effect.
🪄 Autofix
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 Plus
Run ID: 23c2f1e9-5721-49db-ac57-fc194c441aac
📒 Files selected for processing (4)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/hooks/useFilesTabBridge/useFilesTabBridge.tsapps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsxapps/desktop/src/shared/file-tree-patterns.test.tsapps/desktop/src/shared/file-tree-patterns.ts
💤 Files with no reviewable changes (1)
- apps/desktop/src/shared/file-tree-patterns.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- apps/desktop/src/shared/file-tree-patterns.test.ts
- apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/components/FilesTab/hooks/useFilesTabBridge/useFilesTabBridge.ts
| disabled={isUnavailable || setPatterns.isPending} | ||
| value={value} | ||
| onChange={(event) => setDraft(event.target.value)} | ||
| /> |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
file=$(fd -t f 'FileTreeHiddenSection\.tsx$' . | head -n 1)
rg -n -C 8 \
'onSuccess|invalidate|isPending|useEffect|persisted|setDraft' \
"$file"
if rg -q \
'void utils\.settings\.getFileTreeHiddenPatterns\.invalidate\(\)' \
"$file"; then
echo "FAIL: invalidation is not awaited or returned"
exit 1
fi
echo "PASS: invalidation is not explicitly discarded"Repository: superset-sh/superset
Length of output: 3455
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
file=$(fd -t f 'FileTreeHiddenSection\.tsx$' . | head -n 1)
printf '%s\n' "== component =="
cat -n "$file"
printf '%s\n' "== related tests and mutation/query definitions =="
rg -n -C 6 \
'FileTreeHiddenSection|setFileTreeHiddenPatterns|getFileTreeHiddenPatterns|createTRPC|invalidate\(' \
apps/desktop --glob '*.{ts,tsx}' --glob '*.{test,spec}.{ts,tsx}' \
| head -n 500Repository: superset-sh/superset
Length of output: 50376
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
needle = "FileTreeHiddenSection"
for p in Path(".").rglob("*"):
if p.is_file() and any(part in {"node_modules", ".git", "dist", "build"} for part in p.parts):
continue
try:
text = p.read_text()
except (UnicodeDecodeError, OSError):
continue
if needle in text and p.name != "FileTreeHiddenSection.tsx":
print(p)
PYRepository: superset-sh/superset
Length of output: 419
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' "== settings router =="
cat -n apps/desktop/src/lib/trpc/routers/settings/index.ts | sed -n '940,990p'
printf '%s\n' "== query provider and dependency versions =="
rg -n -C 8 \
'QueryClient|ElectronTRPCProvider|`@tanstack/react-query`|`@trpc/react-query`|trpc-electron' \
apps/desktop/src/renderer/providers apps/desktop/package.json package.json bun.lock \
--glob '*.{ts,tsx,json,yaml,yml}' \
| head -n 300
printf '%s\n' "== component test files =="
fd -t f -i 'FileTreeHiddenSection|AppearanceSettings' apps/desktop | sortRepository: superset-sh/superset
Length of output: 24757
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
# Read-only state-machine probe for the sequence described by the component:
# mutation success -> invalidation/refetch starts -> editor becomes enabled ->
# user edits -> refetch changes persisted -> effect clears draft.
persisted = "old\npattern"
draft = "new\npattern"
events = []
events.append(("mutation success", persisted, draft))
events.append(("onSuccess returns immediately", persisted, draft))
draft = "new\npattern\nuser-edit"
events.append(("user edits while refetch is pending", persisted, draft))
persisted = "new\npattern"
draft = None # useEffect([persisted]) behavior
events.append(("refetch updates persisted; effect clears draft", persisted, draft))
for event, current_persisted, current_draft in events:
print(f"{event}: persisted={current_persisted!r}, draft={current_draft!r}")
if events[-1][2] is None:
print("FAIL: the user edit is discarded by the persisted-change effect")
raise SystemExit(1)
PYRepository: superset-sh/superset
Length of output: 545
Await invalidation before re-enabling the editor.
onSuccess discards invalidate(), but the editor only checks setPatterns.isPending. A user edit can occur before the refetch completes, and the persisted effect can then clear that edit. Return or await invalidate() and add a delayed-refetch regression test.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx`
around lines 87 - 90, Update the mutation success flow associated with the
editor around setPatterns so it returns or awaits the query invalidate operation
before completing, keeping the editor disabled until refetch finishes. Add a
regression test that verifies edits made during the delayed refetch are not
cleared by the persisted-state effect.
Source: MCP tools
| {isError && ( | ||
| <div className="mt-2 flex items-center gap-2 text-xs text-destructive"> | ||
| <span>Could not load hidden file patterns.</span> | ||
| <Button | ||
| variant="outline" | ||
| size="sm" | ||
| className="h-7 text-xs" | ||
| onClick={() => void refetch()} | ||
| > | ||
| Retry | ||
| </Button> | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Make the load error message selectable.
Add select-text cursor-text to the <span> that renders the error.
Proposed fix
- <span>Could not load hidden file patterns.</span>
+ <span className="select-text cursor-text">
+ Could not load hidden file patterns.
+ </span>As per coding guidelines, rendered error messages in apps/desktop/src/renderer/**/*.{tsx,css,scss} must include select-text cursor-text classes.
📝 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.
| {isError && ( | |
| <div className="mt-2 flex items-center gap-2 text-xs text-destructive"> | |
| <span>Could not load hidden file patterns.</span> | |
| <Button | |
| variant="outline" | |
| size="sm" | |
| className="h-7 text-xs" | |
| onClick={() => void refetch()} | |
| > | |
| Retry | |
| </Button> | |
| </div> | |
| )} | |
| {isError && ( | |
| <div className="mt-2 flex items-center gap-2 text-xs text-destructive"> | |
| <span className="select-text cursor-text"> | |
| Could not load hidden file patterns. | |
| </span> | |
| <Button | |
| variant="outline" | |
| size="sm" | |
| className="h-7 text-xs" | |
| onClick={() => void refetch()} | |
| > | |
| Retry | |
| </Button> | |
| </div> | |
| )} |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx`
around lines 92 - 104, Add the `select-text cursor-text` classes to the
error-message span in `FileTreeHiddenSection`, preserving the existing styling
and retry button behavior.
Source: Coding guidelines
There was a problem hiding this comment.
2 issues found across 4 files (changes from recent commits).
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="apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx">
<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx:34">
P3: isUnavailable is true whenever isError is true, not just when data is unknown. After a first successful load, a later background refetch that fails (e.g. on window focus/invalidate) leaves the cached data in place while isError flips to true, so the textarea, Save, and Reset all become disabled and an error banner appears even though the current patterns are known and displayed. The stated intent is only to guard against an unknown list (data === undefined); consider disabling on data === undefined || (isError && data === undefined), or tracking the error only when there is no cached value.</violation>
<violation number="2" location="apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx:94">
P3: The newly added error message span doesn't include `select-text cursor-text` classes, which per repo convention for rendered error messages in this renderer directory should be selectable by users for easier copy/paste when reporting issues.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| electronTrpc.settings.getFileTreeHiddenPatterns.useQuery(); | ||
| // Never edit against an unknown list: saving an empty fallback would wipe | ||
| // the stored patterns. | ||
| const isUnavailable = isError || data === undefined; |
There was a problem hiding this comment.
P3: isUnavailable is true whenever isError is true, not just when data is unknown. After a first successful load, a later background refetch that fails (e.g. on window focus/invalidate) leaves the cached data in place while isError flips to true, so the textarea, Save, and Reset all become disabled and an error banner appears even though the current patterns are known and displayed. The stated intent is only to guard against an unknown list (data === undefined); consider disabling on data === undefined || (isError && data === undefined), or tracking the error only when there is no cached value.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx, line 34:
<comment>isUnavailable is true whenever isError is true, not just when data is unknown. After a first successful load, a later background refetch that fails (e.g. on window focus/invalidate) leaves the cached data in place while isError flips to true, so the textarea, Save, and Reset all become disabled and an error banner appears even though the current patterns are known and displayed. The stated intent is only to guard against an unknown list (data === undefined); consider disabling on data === undefined || (isError && data === undefined), or tracking the error only when there is no cached value.</comment>
<file context>
@@ -27,8 +27,11 @@ function toPatterns(text: string): string[] {
electronTrpc.settings.getFileTreeHiddenPatterns.useQuery();
+ // Never edit against an unknown list: saving an empty fallback would wipe
+ // the stored patterns.
+ const isUnavailable = isError || data === undefined;
const setPatterns =
electronTrpc.settings.setFileTreeHiddenPatterns.useMutation({
</file context>
|
|
||
| {isError && ( | ||
| <div className="mt-2 flex items-center gap-2 text-xs text-destructive"> | ||
| <span>Could not load hidden file patterns.</span> |
There was a problem hiding this comment.
P3: The newly added error message span doesn't include select-text cursor-text classes, which per repo convention for rendered error messages in this renderer directory should be selectable by users for easier copy/paste when reporting issues.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/routes/_authenticated/settings/appearance/components/AppearanceSettings/components/FileTreeHiddenSection/FileTreeHiddenSection.tsx, line 94:
<comment>The newly added error message span doesn't include `select-text cursor-text` classes, which per repo convention for rendered error messages in this renderer directory should be selectable by users for easier copy/paste when reporting issues.</comment>
<file context>
@@ -81,24 +84,38 @@ export function FileTreeHiddenSection() {
+ {isError && (
+ <div className="mt-2 flex items-center gap-2 text-xs text-destructive">
+ <span>Could not load hidden file patterns.</span>
+ <Button
+ variant="outline"
</file context>
| <span>Could not load hidden file patterns.</span> | |
| <span className="select-text cursor-text"> | |
| Could not load hidden file patterns. | |
| </span> |
|
This PR has had no activity for 53 days and will close in 7 days unless there is new activity. If this contribution is still important or relevant, please leave a comment to keep it open. If it closes, you are welcome to reopen it or ask a maintainer to reopen it. Thank you for contributing! |
|
This PR was automatically closed due to inactivity to help keep the review queue manageable. This does not mean the contribution was rejected. If this contribution is still important or relevant, please reopen it or leave a comment asking a maintainer to reopen it. Thank you for contributing! |
Summary
.git,node_modules, and.DS_StoreCloses the current request tracked in #5595 and revives the still-applicable behavior from #3153.
Validation
bun test src/shared/file-tree-patterns.test.ts src/renderer/routes/_authenticated/settings/utils/settings-search/bunx turbo typecheck --filter=@superset/desktop --filter=@superset/local-dbManual behavior verified
.git,node_modules, and.DS_Store/output, directory-onlybuild/, basename,*,?, and**patterns behave as documentedSummary by cubic
Adds configurable hidden-file patterns to Desktop file trees, applied to both the v2 workspace tree and the legacy Files explorer. Patterns are persisted, loaded before first render, and used to filter loads, refreshes, live events, and search results.
New Features
.git,node_modules, and.DS_Store; every loaded directory reloads immediately when patterns change; initial load waits for persisted patterns.*,?,**, leading/to anchor to root, trailing/for directories, and basename matches without/.getFileTreeHiddenPatternsandsetFileTreeHiddenPatternswith input limits; saves are blocked if the pattern list hasn’t loaded.Migration
settings.file_tree_hidden_patternscolumn in@superset/local-db; applies via existing migrations, no manual steps.Written for commit 69105e1. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Tests