Skip to content

refactor: delete unused notesApiService orphan API module#1560

Merged
MODSetter merged 1 commit into
MODSetter:devfrom
mvanhorn:refactor/1363-delete-notes-api-service
Jun 30, 2026
Merged

refactor: delete unused notesApiService orphan API module#1560
MODSetter merged 1 commit into
MODSetter:devfrom
mvanhorn:refactor/1363-delete-notes-api-service

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

Deletes surfsense_web/lib/apis/notes-api.service.ts, the 147-line NotesApiService class (Zod schemas, 7 CRUD methods, and the notesApiService singleton). The module was imported nowhere in the web app: the notes UI talks to documentsApiService against /documents/.../editor-content, /save, and /download-markdown, so this /notes REST wrapper was dead code.

Motivation and Context

Issue #1363 flags this file as an orphan module that adds bundle size and mental overhead with no call sites. A rg "notesApiService|@/lib/apis/notes-api" surfsense_web returns only the file's own definition lines, and there is no companion contracts/types/notes.types.ts or barrel reference. Removing it is a safe, self-contained cleanup.

This re-raises the previously closed PR #1438 against dev per the maintainer's request.

Fixes #1363

Screenshots

Not applicable. This change only deletes an unused module and has no visual impact.

API Changes

  • This PR includes API changes

Change Type

  • Refactoring

Testing Performed

  • Tested locally
  • Manual/QA verification

Verified the deleted symbols have zero remaining references in surfsense_web via rg, and confirmed no notes.types or barrel imports point at the module.

Checklist

  • Follows project coding standards and conventions
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR removes an unused 147-line NotesApiService module from the web application. The service was never imported or used anywhere in the codebase, as the notes UI already communicates with the backend through the existing documentsApiService instead. This cleanup reduces bundle size and removes dead code without any functional impact.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_web/lib/apis/notes-api.service.ts

Need help? Join our Discord

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@mvanhorn is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1472b8ed-e7a9-469b-8219-8d8fce01d9b1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@MODSetter MODSetter merged commit d0664f3 into MODSetter:dev Jun 30, 2026
6 of 9 checks passed
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.

2 participants