chore(web): remove dead code surfaced by lint
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.
This commit is contained in:
parent
aba7152097
commit
f4564d7cd6
@ -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)}
|
||||
/>
|
||||
<MetadataPanel note={note} />
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user