refactor: delete unused notesApiService orphan API module#1560
Conversation
|
@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. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
Description
Deletes
surfsense_web/lib/apis/notes-api.service.ts, the 147-lineNotesApiServiceclass (Zod schemas, 7 CRUD methods, and thenotesApiServicesingleton). The module was imported nowhere in the web app: the notes UI talks todocumentsApiServiceagainst/documents/.../editor-content,/save, and/download-markdown, so this/notesREST 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_webreturns only the file's own definition lines, and there is no companioncontracts/types/notes.types.tsor barrel reference. Removing it is a safe, self-contained cleanup.This re-raises the previously closed PR #1438 against
devper the maintainer's request.Fixes #1363
Screenshots
Not applicable. This change only deletes an unused module and has no visual impact.
API Changes
Change Type
Testing Performed
Verified the deleted symbols have zero remaining references in
surfsense_webviarg, and confirmed nonotes.typesor barrel imports point at the module.Checklist
High-level PR Summary
This PR removes an unused 147-line
NotesApiServicemodule 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 existingdocumentsApiServiceinstead. This cleanup reduces bundle size and removes dead code without any functional impact.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_web/lib/apis/notes-api.service.ts