Closed
Conversation
Extract duplicated image/upload/agents handlers into shared-handlers.ts and doc/vault reference endpoints into reference-handlers.ts. Unifies the three identical handleServerReady functions. Closes #210. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract ~100 lines of duplicated theme variables, base styles, and global utilities into packages/ui/base.css, imported by both editor and review-editor CSS files. Move formatTimestamp() from AnnotationPanel and ReviewPanel into packages/ui/utils/format.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete unimplemented S3 paste store stub - Un-export internal helpers in ImageAnnotator/utils.ts - Un-export extractDoneSteps in pi-extension/utils.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install @biomejs/biome with recommended rules - Configure formatting to match existing conventions (2 spaces, single quotes, trailing commas) - Enable Tailwind CSS directive parsing - Downgrade noisy rules to warnings (a11y, exhaustive-deps, explicit-any, etc.) - Add lint/format/check scripts to root package.json - Add CI workflow that runs biome ci on PRs to main Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Formatting: normalize all source files to biome conventions (2-space indent, single quotes, trailing commas, 100 char width, sorted imports). Lint fixes: - Remove unused import (corsHeaders in paste-service handler) - Remove unused variables (sharedGlobalAttachments, validateAgent, availableAgents, DEFAULT_SETTINGS) - Remove unused catch parameters - Add node: protocol to Node.js builtin imports - Replace @ts-ignore with @ts-expect-error - Suppress intentional document.cookie usage in storage utility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add TODO to re-enable a11y rules once findings are addressed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reverts unsafe biome lint --write --unsafe changes that modified React hook dependency arrays, potentially introducing stale closures and infinite re-render bugs. Promotes useExhaustiveDependencies, noAssignInExpressions, and noInvalidUseBeforeDeclaration from off/warn to error with targeted inline suppressions. Reverts _onUpdate rename in pi-extension. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sidebar.open/close (useCallback []), vaultBrowser.setActiveFile (useState setter), and handleCopyDiff (useCallback [diffData]) are genuinely stable — add them to dep arrays instead of suppressing. Fix misleading ImageAnnotator comment (handleAccept is a plain function, not useCallback). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
handleObsidianChange (Settings.tsx) and handleCopyDiff (review-editor/App.tsx) were in dep arrays but defined later in the component — const is not hoisted, so React hit "Cannot access before initialization" at runtime. Also updates CLAUDE.md project structure to reflect the server handler extraction from PR #211. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
Closing this PR. The biome integration (
The non-biome work in this branch (server handler extraction, dead code removal, CSS theme extraction) was solid but is now entangled with 59 files of lint changes. Will cherry-pick the good commits into clean PRs separately. Lessons learned documented in a new issue. |
This was referenced Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/image,/api/upload,/api/agentshandlers intoshared-handlers.ts(were copy-pasted across all 3 server files)/api/doc,/api/reference/obsidian/files,/api/reference/obsidian/doc+buildFileTreeintoreference-handlers.tshandleServerReadyfunctions into one shared exportCloses #210
Result
index.tsreview.tsannotate.tsshared-handlers.tsreference-handlers.tsNo behavior changes. All closure-dependent handlers (approve, deny, versions, vscode-diff) remain inline.
Test plan
bun run build:hookcompiles cleanly/plannotator-reviewcode review mode🤖 Generated with Claude Code