feat(files): add ignored-file visibility toggle #5951
Closeddiegoarff(GitHub profile, opens in a new tab)wants to merge 3 commits into
main fromrefs/pull/5951/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/workspace/WorkspaceEntries.ts lines 284 to 291OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -272,3 +275,17 @@272275 );273276 });274277278+ const listIncludingIgnored = Effect.fn("WorkspaceEntries.listIncludingIgnored")(function* (279+ cwd: string,280+ indexed: ProjectListEntriesResult,281+ ): Effect.fn.Return<ProjectListEntriesResult, WorkspaceEntriesError> {282+ const existingPaths = new Set(indexed.entries.map((entry) => entry.path));283+ const candidates: ProjectEntry[] = [];284+ const listFailure = (reason: string, cause: unknown) =>285+ new WorkspaceSearchIndex.WorkspaceSearchIndexSearchFailed({286+ cwd,287+ queryLength: 0,288+ pageSize: indexed.entries.length,289+ reason,290+ cause,291+ });
- apps/web/src/components/files/FileBrowserPanel.tsx line 275Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -262,3 +266,10 @@262266 model.resetPaths(treePaths);263267 }, [entryKinds, model, treePaths]);264268269+ useEffect(() => {270+ const statuses: GitStatusEntry[] = [];271+ for (const entry of entries) {272+ if (entry.ignored) statuses.push({ path: treePath(entry), status: "ignored" });273+ }274+ model.setGitStatus(statuses);275+ }, [entries, model]);
- apps/server/src/workspace/WorkspaceEntries.ts lines 312 to 318OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -272,3 +303,16 @@272303 );273304 });274305306+ const listIncludingIgnored = Effect.fn("WorkspaceEntries.listIncludingIgnored")(function* (307+ cwd: string,308+ indexed: ProjectListEntriesResult,309+ ): Effect.fn.Return<ProjectListEntriesResult, WorkspaceEntriesError> {310+ const existingPaths = new Set(indexed.entries.map((entry) => entry.path));311+ const candidates: ProjectEntry[] = [];312+ const vcs = yield* vcsDriverRegistry313+ .detect({ cwd })314+ .pipe(315+ Effect.mapError(316+ (cause) => new WorkspaceEntriesIgnoreClassificationError({ cwd, pathCount: 0, cause }),317+ ),318+ );
- apps/web/src/components/files/projectFilesQueryState.ts lines 149 to 159OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -125,7 +140,20 @@125140 environmentId: EnvironmentId,126141 cwd: string,142+ includeIgnored = false,127143 ): ProjectQueryState<ProjectListEntriesResult> {128- const atom = getProjectEntriesQueryAtom(environmentId, cwd);144+ const atom = getProjectEntriesQueryAtom(environmentId, cwd, includeIgnored);129145 const result = useAtomValue(atom);130146 const refreshAtom = useAtomRefresh(atom);131147 const refresh = useCallback(() => refreshAtom(), [refreshAtom]);148+ const currentData = Option.getOrNull(AsyncResult.value(result));149+ const settledRef = useRef<{150+ readonly environmentId: EnvironmentId;151+ readonly cwd: string;152+ readonly data: ProjectListEntriesResult;153+ } | null>(null);154+ useEffect(() => {155+ if (currentData !== null) settledRef.current = { environmentId, cwd, data: currentData };156+ }, [currentData, cwd, environmentId]);157+ const settled = settledRef.current;158+ const settledData =159+ settled?.environmentId === environmentId && settled.cwd === cwd ? settled.data : null;
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.






Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
21858f64-80ec-4ae7-86a0-e0e67a77ba35You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
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