Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: exclude errored files (#3746)#3909

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Bhogeshwarj wants to merge1 commit intorequestly:master
base:master
Choose a base branch
Loading
fromBhogeshwarj:feature/3746-exclude-error-files

Conversation

@Bhogeshwarj
Copy link
Contributor

@BhogeshwarjBhogeshwarj commentedNov 22, 2025
edited by coderabbitaibot
Loading

Closes issue:#3746

🎥 Demo Video:

Video/Demo:
Before :
Screenshot 2025-11-22 at 7 03 44 PM

After :

Screen.Recording.2025-11-22.at.7.02.49.PM.mov

📜 Summary of changes:

📝 Overview

Implemented a new feature that allows users to exclude errored files directly from
the UI. When a workspace contains invalid/unsupported files, users can now click an
"Exclude" button to permanently ignore these files in future workspace scans.


✨ What's New

User-Facing Features

  • ✅ Added "Exclude" button (eye-off icon) next to each errored file in the sidebar
  • ✅ One-click exclusion of problematic files from workspace scanning
  • ✅ Excluded files are stored in requestly.json and persist across app restarts
  • ✅ Automatic workspace refresh after exclusion
  • ✅ Success/error toast notifications for user feedback

🏗️ Architecture

The implementation follows the existing architecture pattern and leverages the
already-present exclusion mechanism:

UI (React) → Repository → Adapter → IPC → Desktop App (FsManager) → requestly.json

How It Works

  1. User clicks "Exclude" on an errored file
  2. File path is added to the exclude array in workspace's requestly.json
  3. FsIgnoreManager is reloaded with updated exclusion patterns
  4. Workspace automatically refreshes
  5. Excluded file no longer appears in error files list

📁 Files Changed

Desktop App (requestly-desktop-app)

  1. Core Logic
  • src/renderer/actions/local-sync/fs-manager.ts
    • Added excludeFile(filePath) method (lines 128-210)
    • Validates file is within workspace root
    • Converts absolute path to relative path
    • Adds to requestly.json exclude array (avoids duplicates)
    • Automatically reloads FsIgnoreManager
  1. IPC Service
  • src/renderer/actions/local-sync/fs-manager.rpc-service.ts
    • Exposed excludeFile method via RPC (lines 154-157)
    • IPC channel: local_sync: ${workspacePath}-excludeFile

Webapp (requestly/app)

  1. Adapter Layer
  • src/services/fsManagerServiceAdapter.ts
    • Added excludeFile(filePath) method (lines 179-182)
    • Decorated with @FsErrorHandler for error handling
  1. Repository Interface
  • src/features/apiClient/helpers/modules/sync/interfaces.ts
    • Added excludeErrorFile(filePath) to ApiClientRecordsInterface (line 87)
  1. Repository Implementation
  • src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsS
    ync.ts
    • Implemented excludeErrorFile() method (lines 595-614)
    • Calls adapter's excludeFile() method
  1. UI Component
  • src/features/apiClient/screens/apiClient/components/sidebar/components/ErrorFiles
    List/ErrorFileslist.tsx
    • Imported MdVisibilityOff icon (line 5)
    • Added excludeErrorFile prop to ErrorFileItem (line 109)
    • Added exclude button with tooltip (lines 119-121)
    • Implemented handleExcludeErrorFile handler (lines 185-205)
    • Triggers forceRefreshRecords/Environments after exclusion

Exclusion Mechanism

  • Uses existing FsIgnoreManager class
  • Leverages ignore npm package (gitignore-style patterns)
  • Supports:
    • Exact file matches: "file.txt"
    • Wildcards: ".log", "**/.tmp"
    • Folder patterns: "node_modules", "dist/**"

Filtering Flow

  1. getAllRecords() → parseFolder()
  2. parseFolder() → sanitizeFsResourceList(..., this.fsIgnoreManager)
  3. sanitizeFsResourceList() → fsIgnoreManager.checkShouldIgnore(path)
  4. Excluded files are filtered out before parsing
  5. Only non-excluded files can appear in erroredRecords

✅ Testing Checklist

  • Desktop app compiles without errors
  • Webapp compiles without errors
  • Exclude button appears for each errored file
  • Clicking exclude adds correct path to requestly.json
  • No first character missing in saved paths
  • No trailing slashes in saved paths
  • Excluded file disappears after workspace refresh
  • Success toast notification appears
  • Error handling works for invalid paths
  • Works for both API and Environment error files
  • Exclusions persist across app restarts
  • Duplicate exclusions are prevented

🎨 UI Changes

Before: Errored files only had "Edit" and "Delete" buttons

After: Errored files now have "Edit", "Exclude" (eye-off icon), and "Delete"
buttons


📊 Impact

  • User Experience: Users can now manage problematic files without manually editing
    requestly.json
  • Backwards Compatible: No breaking changes, works with existing workspaces
  • Performance: No performance impact, uses existing exclusion infrastructure
  • Maintainability: Follows existing code patterns and architecture

🔗 Related

  • Builds on existing FsIgnoreManager infrastructure
  • No new dependencies added
  • No schema changes (uses existing requestly.json structure)

Summary by CodeRabbit

  • New Features
    • Added ability to exclude error files from the workspace with a new exclude action button in the error files list.
    • Displays success notification upon successful exclusion and automatically refreshes workspace data.
    • Shows error notification if exclusion fails with details for troubleshooting.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitaibot commentedNov 22, 2025
edited
Loading

Walkthrough

This PR introduces functionality to exclude error files from the workspace. A newexcludeErrorFile method is added to theApiClientRecordsInterface, implemented inLocalApiClientRecordsSync, and backed by a newexcludeFile method inFsManagerServiceAdapter. The UI layer integrates an "Exclude file from workspace" button in the ErrorFilesList component with an event handler that calls the exclude API, refreshes workspace data, and displays success or error notifications.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • ErrorFilesList component: Review the new exclude action handler, particularly the conditional logic for refreshing environments vs. records and the toast/notification messaging
  • Interface and service layers: Verify that method signatures are consistent across interface, implementation, and adapter
  • Error handling paths: Confirm proper error propagation and fallback messaging throughout the call chain

Possibly related issues

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title 'feat: exclude errored files' directly and concisely describes the main feature addition implemented across all modified files.
Description check✅ PassedThe PR description is comprehensive and complete, covering summary of changes, demo video/screenshots, detailed architecture, implementation details, testing checklist, and impact analysis, though the demo video link appears incomplete.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for usingCodeRabbit! 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
Contributor

@coderabbitaicoderabbitaibot 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: 0

🧹 Nitpick comments (1)
app/src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsSync.ts (1)

595-614:Implementation is solid; consider removing unreachable null check.

The method correctly implements the exclude functionality and handles success/error cases appropriately. However, the null check foradapter on lines 597-602 appears to be unreachable. Looking at thegetAdapter() implementation (line 20-22) and thefsManagerServiceAdapterProvider.get() method (fsManagerServiceAdapter.ts, lines 192-221), the provider either returns a valid adapter instance or throws an error—it never returns null or undefined.

If you'd like to simplify, you can remove the null check:

 async excludeErrorFile(filePath: string): Promise<{ success: boolean; message?: string }> {   const adapter = await this.getAdapter();-  if (!adapter) {-    return {-      success: false,-      message: "Failed to get filesystem adapter",-    };-  }   const result = await adapter.excludeFile(filePath);   if (result.type === "success") {     return { success: true };   }   return {     success: false,     message: result.error.message || "Failed to exclude file",   }; }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between4dcf2b3 andb85253c.

📒 Files selected for processing (4)
  • app/src/features/apiClient/helpers/modules/sync/interfaces.ts (1 hunks)
  • app/src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsSync.ts (1 hunks)
  • app/src/features/apiClient/screens/apiClient/components/sidebar/components/ErrorFilesList/ErrorFileslist.tsx (5 hunks)
  • app/src/services/fsManagerServiceAdapter.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-10-08T19:29:11.895Z
Learnt from: rohanmathur91Repo: requestly/requestly PR: 3658File: app/src/features/apiClient/helpers/modules/sync/localStore/services/LocalStoreRecordsSync.ts:302-333Timestamp: 2025-10-08T19:29:11.895ZLearning: Methods in `LocalStoreRecordsSync` that return `ResponsePromise<T>` use the error format `{ success: false, data: null, error: { type, message } }` rather than the simpler `{ success: false, data: null, message }` format used by older methods. This is the expected and intentional error response structure for `ResponsePromise` return types.

Applied to files:

  • app/src/features/apiClient/helpers/modules/sync/interfaces.ts
  • app/src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsSync.ts
📚 Learning: 2025-10-10T08:10:29.153Z
Learnt from: rohanmathur91Repo: requestly/requestly PR: 3658File: app/src/backend/apiClient/batchCreateCollectionRunDetailsInFirebase.ts:29-32Timestamp: 2025-10-10T08:10:29.153ZLearning: In app/src/backend/apiClient/batchCreateCollectionRunDetailsInFirebase.ts, the error path intentionally returns `data: null` rather than an object with `records` and `erroredRecords` arrays. This is a deliberate design decision.

Applied to files:

  • app/src/features/apiClient/helpers/modules/sync/interfaces.ts
  • app/src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsSync.ts
📚 Learning: 2025-10-16T10:25:34.657Z
Learnt from: nafees87nRepo: requestly/requestly PR: 3697File: app/src/features/apiClient/store/collectionRunConfig/runConfig.store.ts:157-163Timestamp: 2025-10-16T10:25:34.657ZLearning: In `app/src/features/apiClient/store/collectionRunConfig/runConfig.store.ts`, the `setDataFile` and `removeDataFile` methods should NOT call `setHasUnsavedChanges(true)` as unsaved changes tracking for dataFile operations is handled elsewhere or through a different mechanism.

Applied to files:

  • app/src/features/apiClient/screens/apiClient/components/sidebar/components/ErrorFilesList/ErrorFileslist.tsx
📚 Learning: 2025-10-10T07:10:27.986Z
Learnt from: rohanmathur91Repo: requestly/requestly PR: 3658File: app/src/features/apiClient/helpers/modules/sync/localStore/services/LocalStoreRecordsSync.ts:451-491Timestamp: 2025-10-10T07:10:27.986ZLearning: In `app/src/features/apiClient/helpers/modules/sync/localStore/services/LocalStoreRecordsSync.ts`, the `addRunResult` method does not need to validate that `runResult.runStatus` is "COMPLETED" because this validation is enforced at a higher layer in the application architecture.

Applied to files:

  • app/src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsSync.ts
🧬 Code graph analysis (2)
app/src/features/apiClient/screens/apiClient/components/sidebar/components/ErrorFilesList/ErrorFileslist.tsx (3)
app/src/features/apiClient/helpers/modules/sync/local/services/types.ts (1)
  • ErroredRecord (99-104)
app/src/features/apiClient/helpers/modules/sync/local/services/LocalApiClientRecordsSync.ts (1)
  • excludeErrorFile (595-614)
app/src/features/apiClient/commands/environments/force-refresh.command.ts (1)
  • forceRefreshEnvironments (4-23)
app/src/services/fsManagerServiceAdapter.ts (1)
app/src/features/apiClient/helpers/modules/sync/local/services/types.ts (1)
  • FileSystemResult (15-15)
🔇 Additional comments (3)
app/src/services/fsManagerServiceAdapter.ts (1)

178-182:LGTM! Consistent implementation following established patterns.

TheexcludeFile method correctly:

  • Uses the@FsErrorHandler decorator for consistent error handling
  • Delegates toinvokeProcedureInBG like all other methods in this adapter
  • Returns the appropriateFileSystemResult<void> type
app/src/features/apiClient/helpers/modules/sync/interfaces.ts (1)

87-87:LGTM! Interface extension follows established conventions.

TheexcludeErrorFile method signature is consistent with similar operations likedeleteRecords (line 41), using the same{ success: boolean; message?: string } return pattern.

app/src/features/apiClient/screens/apiClient/components/sidebar/components/ErrorFilesList/ErrorFileslist.tsx (1)

5-5:LGTM! UI integration follows existing patterns and handles all cases appropriately.

The exclude functionality is implemented consistently with the existinghandleDeleteErrorFile pattern:

  • Calls the repository method
  • Conditionally refreshes environments or records based on file type
  • Provides clear user feedback via toast (success) or notification (error)
  • Dependencies inuseCallback are correct

The refresh operations (forceRefreshEnvironments/forceRefreshRecords) are not awaited, which is consistent with the delete handler and creates a fire-and-forget pattern where the toast appears immediately while the refresh happens in the background.

Also applies to: 109-110, 119-121, 185-205, 241-241

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add Support to Exclude Error Files Directly from UI

1 participant

@Bhogeshwarj

[8]ページ先頭

©2009-2025 Movatter.jp