Skip to content

fix: report a failed dataproxy recents query instead of hiding it#3936

Merged
rezk2ll merged 1 commit into
masterfrom
fix/report-recents-failure
Jun 19, 2026
Merged

fix: report a failed dataproxy recents query instead of hiding it#3936
rezk2ll merged 1 commit into
masterfrom
fix/report-recents-failure

Conversation

@rezk2ll

@rezk2ll rezk2ll commented Jun 19, 2026

Copy link
Copy Markdown
Member

Problem

When the dataproxy recents query fails, the error was logged at warn and swallowed, so it never reached Sentry and we had no visibility into it (the view silently falls back to the local query).

Solution

Log the failure with logger.error, which the app's Sentry config records, while keeping the local-query fallback. Matches how the rest of the app reports errors.

Summary by CodeRabbit

  • Chores
    • Enhanced error logging severity for recents synchronization operations.

The dataproxy recents failure was logged at warn level and swallowed, so it
never surfaced in Sentry. Log it with logger.error (which the app's Sentry
config records) while keeping the local-query fallback.
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8bfee193-910e-4bcf-b095-5ed7076dc0cd

📥 Commits

Reviewing files that changed from the base of the PR and between 1600705 and b26c5ea.

📒 Files selected for processing (2)
  • src/hooks/useRecentFiles.jsx
  • src/hooks/useRecentFiles.spec.jsx

Walkthrough

In useRecentFiles.jsx, the catch block inside useDataProxyRecents is changed to call logger.error instead of logger.warn when dataProxy.recents() fails. In useRecentFiles.spec.jsx, the logger mock is extended to include error: jest.fn(), the success-path assertion is updated to verify logger.error is not called, and both error-path assertions are updated to expect logger.error calls (with the same message and error object as before).

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: upgrading dataproxy recents query failure reporting from hidden (warn-level logging) to visible (error-level logging for Sentry).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 fix/report-recents-failure

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Passed
3 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@bundlemon

bundlemon Bot commented Jun 19, 2026

Copy link
Copy Markdown

BundleMon

Unchanged files (20)
Status Path Size Limits
static/js/cozy.(hash).js
928.17KB -
static/resource/(hash).js
336.09KB -
services/qualificationMigration.js
283.39KB -
services/dacc.js
263.13KB -
static/js/main.(hash).js
48.13KB -
static/js/lib-react.(hash).js
43.88KB -
static/css/cozy.(hash).css
30.13KB -
static/js/lib-polyfill.(hash).js
22.77KB -
static/js/lib-router.(hash).js
21.86KB -
static/js/public.(hash).js
19.79KB -
static/css/main.(hash).css
13.57KB -
static/js/intents.(hash).js
9.2KB -
static/js/(chunkId).(hash).js
8.6KB -
manifest.webapp
3.09KB -
static/css/public.(hash).css
2.34KB -
static/js/async/(chunkId).(hash).js
2.06KB -
main/index.html
767B -
public/index.html
704B -
intents/index.html
645B -
assets/manifest.json
185B -

Total files change +2B 0%

Unchanged groups (3)
Status Path Size Limits
**/*.js
5.98MB -
**/*.{png,svg,ico}
2.16MB -
**/*.css
77.42KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@rezk2ll rezk2ll merged commit cde333f into master Jun 19, 2026
6 checks passed
@rezk2ll rezk2ll deleted the fix/report-recents-failure branch June 19, 2026 13:11
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.

3 participants