From f4564d7cd6041b514e6249567ffb11391a61ddfe Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Fri, 22 May 2026 23:51:59 -0700 Subject: [PATCH] chore(web): remove dead code surfaced by lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three mechanical lint warnings in the web package are resolved with zero behavior change: - web/src/app/(app)/notes/[noteId]/page.tsx — rename onTagsAccepted callback param to '_tags' to match the no-unused-vars allowlist (the param is intentionally unused; we trigger a re-save regardless). - web/src/lib/feedback-client.ts — drop the unused PRODUCT_ID import. - web/src/lib/notes-client.ts — delete the dead toWorkspaceSummary() helper. Workspace summaries are produced by listWorkspaceSummaries() on the backend response now; the local helper had no callers. Web lint goes from 23 → 20 warnings. Remaining 20 are React-compiler advisories about setState-in-effect patterns; those require careful per-component refactoring (useReducer, derive-from-props, or startTransition) and are tracked under Sprint D / Q1 tech debt rather than fixed mechanically. --- web/src/app/(app)/notes/[noteId]/page.tsx | 2 +- web/src/lib/feedback-client.ts | 2 +- web/src/lib/notes-client.ts | 16 ---------------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/web/src/app/(app)/notes/[noteId]/page.tsx b/web/src/app/(app)/notes/[noteId]/page.tsx index 0c764c0..6892ca7 100644 --- a/web/src/app/(app)/notes/[noteId]/page.tsx +++ b/web/src/app/(app)/notes/[noteId]/page.tsx @@ -274,7 +274,7 @@ export default function NoteDetailPage() { noteId={note.id} workspaceId={note.workspaceId} noteTags={note.tags} - onTagsAccepted={(tags) => void handleSave({ title: note.title, body: note.body }, { quiet: true })} + onTagsAccepted={(_tags) => void handleSave({ title: note.title, body: note.body }, { quiet: true })} onResultCreated={() => void getNoteDetail(note.id, note.workspaceId).then(setNote)} /> diff --git a/web/src/lib/feedback-client.ts b/web/src/lib/feedback-client.ts index f65f141..6ddab2b 100644 --- a/web/src/lib/feedback-client.ts +++ b/web/src/lib/feedback-client.ts @@ -1,7 +1,7 @@ "use client"; import { createFeedbackClient, type FeedbackClient } from "@bytelyst/feedback-client"; -import { PLATFORM_SERVICE_URL, PRODUCT_ID } from "@/lib/product-config"; +import { PLATFORM_SERVICE_URL } from "@/lib/product-config"; import { getAccessToken } from "@/lib/api-helpers"; let _client: FeedbackClient | null = null; diff --git a/web/src/lib/notes-client.ts b/web/src/lib/notes-client.ts index 9143ad9..b919391 100644 --- a/web/src/lib/notes-client.ts +++ b/web/src/lib/notes-client.ts @@ -46,22 +46,6 @@ function toNoteSummary(note: NoteDoc): NoteSummary { }; } -function toWorkspaceSummary(workspace: WorkspaceDoc, notes: NoteDoc[]): WorkspaceSummary { - const owner = workspace.members.find((member) => member.role === "owner")?.userId ?? workspace.updatedBy; - const noteCount = notes.filter((note) => note.workspaceId === workspace.id).length; - - return { - id: workspace.id, - name: workspace.name, - description: workspace.description ?? "", - owner, - noteCount, - visibility: workspace.members.length > 1 ? "shared" : "private", - updatedAt: workspace.updatedAt, - tags: [], - }; -} - function toNoteTask(task: NoteTaskDoc): NoteTask { return { id: task.id,