Skip to content

refactor: rewrite extension as a testable monorepo - #47

Merged
marcuscastelo merged 22 commits into
developfrom
rewrite/modern-monorepo
Jul 13, 2026
Merged

marcuscastelo merged 22 commits into
developfrom
rewrite/modern-monorepo

Conversation

@marcuscastelo

@marcuscastelo marcuscastelo commented Jul 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • rewrite Marucs' Anime as a pnpm monorepo with a functional, editor-neutral core
  • preserve the existing .anl syntax and user-visible editing workflows
  • restore diagnostics, navigation, completion, catalog search, and date/time/episode commands
  • add macOS-safe shortcuts, real Extension Host integration, deterministic VSIX packaging, and release CI
  • remove the legacy implementation after parity validation

Architecture

  • packages/core: immutable domain values, pure parser, typed diagnostics, and document queries
  • apps/vscode-extension: VS Code, clock, HTTP catalog, activation, command, and provider adapters
  • Effect.js evaluated and rejected for this boundary in ADR 0001 due to bundle and complexity cost

Validation

  • formatting, Biome, type-aware ESLint, and TypeScript checks
  • 26 core tests and 34 extension unit/contract tests with coverage thresholds
  • real VS Code Extension Host integration suite
  • manual macOS Cmd+Shift+D/T/N workflow smoke
  • VSIX content and declared entry-point verification
  • production dependency audit with no known vulnerabilities

Release note

Physical Windows/Linux Alt+D/T/N smoke remains in the manual release checklist; the contributions are covered by the manifest contract test.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 158 files, which is 8 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6f0203ee-ab8a-4e9c-a806-48271e6d5f10

📥 Commits

Reviewing files that changed from the base of the PR and between 2525a2a and 0a965f9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (158)
  • .claude/agents/ai-workflow-optimizer.md
  • .claude/agents/github-issue-manager.md
  • .claude/agents/memory-optimization-engineer.md
  • .claude/commands/README.md
  • .claude/commands/commit.md
  • .claude/commands/fix.md
  • .claude/commands/issues/breakdown.md
  • .claude/commands/issues/create.md
  • .claude/commands/issues/discover.md
  • .claude/commands/issues/implement.md
  • .claude/commands/issues/prioritize-milestone.md
  • .claude/commands/issues/refine.md
  • .claude/commands/pull-request.md
  • .claude/commands/quality/fix.md
  • .claude/commands/quality/review.md
  • .claude/commands/refactor/clean-architecture.md
  • .claude/commands/session/end.md
  • .claude/commands/workflow/commit.md
  • .claude/commands/workflow/context.md
  • .claude/commands/workflow/orchestrate.md
  • .claude/commands/workflow/pull-request.md
  • .claude/settings.json
  • .coderabbit.yaml
  • .github/workflows/ci.yml
  • .gitignore
  • .nvmrc
  • .vscode/extensions.json
  • .vscode/launch.json
  • .vscode/settings.json
  • .vscode/tasks.json
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • README.md
  • apps/vscode-extension/.vscodeignore
  • apps/vscode-extension/LICENSE
  • apps/vscode-extension/README.md
  • apps/vscode-extension/esbuild.config.mjs
  • apps/vscode-extension/esbuild.integration.config.mjs
  • apps/vscode-extension/package.json
  • apps/vscode-extension/scripts/prepare-package.mjs
  • apps/vscode-extension/scripts/run-integration.mjs
  • apps/vscode-extension/scripts/verify-vsix.mjs
  • apps/vscode-extension/src/activation/create-extension-app.ts
  • apps/vscode-extension/src/catalog/anime-catalog.ts
  • apps/vscode-extension/src/catalog/jikan-transport.ts
  • apps/vscode-extension/src/clock/clock.ts
  • apps/vscode-extension/src/commands/date-time-plans.ts
  • apps/vscode-extension/src/commands/next-episode-plan.ts
  • apps/vscode-extension/src/commands/register-date-time-commands.ts
  • apps/vscode-extension/src/commands/register-next-episode-command.ts
  • apps/vscode-extension/src/completion/local-completion.ts
  • apps/vscode-extension/src/completion/register-local-completion.ts
  • apps/vscode-extension/src/diagnostics/editor-diagnostic.ts
  • apps/vscode-extension/src/documents/document-controller.ts
  • apps/vscode-extension/src/documents/register-document-analysis.ts
  • apps/vscode-extension/src/extension.ts
  • apps/vscode-extension/src/providers/document-insight.ts
  • apps/vscode-extension/src/providers/register-document-features.ts
  • apps/vscode-extension/syntaxes/anime-list.tmLanguage.json
  • apps/vscode-extension/test/activation/create-extension-app.test.ts
  • apps/vscode-extension/test/activation/extension.test.ts
  • apps/vscode-extension/test/catalog/anime-catalog.test.ts
  • apps/vscode-extension/test/catalog/jikan-transport.test.ts
  • apps/vscode-extension/test/clock/clock.test.ts
  • apps/vscode-extension/test/commands/date-time-plans.test.ts
  • apps/vscode-extension/test/commands/next-episode-plan.test.ts
  • apps/vscode-extension/test/completion/local-completion.test.ts
  • apps/vscode-extension/test/diagnostics/editor-diagnostic.test.ts
  • apps/vscode-extension/test/documents/document-controller.test.ts
  • apps/vscode-extension/test/integration/suite.ts
  • apps/vscode-extension/test/manifest/manifest-contract.test.ts
  • apps/vscode-extension/test/providers/document-insight.test.ts
  • apps/vscode-extension/tsconfig.build.json
  • apps/vscode-extension/tsconfig.json
  • apps/vscode-extension/vitest.config.ts
  • biome.json
  • commitlint.config.mjs
  • docs/adr/0001-effect-adoption.md
  • docs/anl-compatibility.md
  • docs/product-behavior.md
  • docs/release-checklist.md
  • docs/target-architecture.md
  • eslint.config.mjs
  • examples/example1.anl
  • lefthook.yml
  • package.json
  • packages/core/package.json
  • packages/core/src/diagnostics/diagnostic.ts
  • packages/core/src/domain/anl-document.ts
  • packages/core/src/domain/tags.ts
  • packages/core/src/index.ts
  • packages/core/src/parsing/classify-source-line.ts
  • packages/core/src/parsing/parse-anl-document.ts
  • packages/core/src/parsing/source-line.ts
  • packages/core/src/use-cases/document-queries.ts
  • packages/core/test/characterization/legacy-anl-contract.test.ts
  • packages/core/test/characterization/legacy-line-oracle.ts
  • packages/core/test/fixtures/basic.anl
  • packages/core/test/fixtures/comments-and-whitespace.anl
  • packages/core/test/fixtures/malformed-lines.anl
  • packages/core/test/fixtures/midnight-crossing.anl
  • packages/core/test/fixtures/partial-episodes.anl
  • packages/core/test/fixtures/tags.anl
  • packages/core/test/fixtures/unicode-titles.anl
  • packages/core/test/package-boundary.test.ts
  • packages/core/test/parsing/classify-source-line.test.ts
  • packages/core/test/parsing/parse-anl-document.test.ts
  • packages/core/test/use-cases/document-queries.test.ts
  • packages/core/tsconfig.build.json
  • packages/core/tsconfig.json
  • packages/core/vitest.config.ts
  • pnpm-workspace.yaml
  • src/analysis/check-tags.ts
  • src/commands/clear-cache.ts
  • src/commands/format-friend.ts
  • src/commands/insert-date.ts
  • src/commands/insert-next-episode.ts
  • src/commands/insert-time.ts
  • src/commands/types.ts
  • src/constants.ts
  • src/core/registry/registry.ts
  • src/core/registry/show-registry.ts
  • src/core/registry/tag-registry.ts
  • src/core/show.ts
  • src/core/tag.ts
  • src/extension.ts
  • src/lang/code-lens/anime-codelens-provider.ts
  • src/lang/code-lens/episode-code-lens-provider.ts
  • src/lang/code-lens/tags-codelens-provider.ts
  • src/lang/completion/anime-completion-provider.ts
  • src/lang/definition/anime-definition-provider.ts
  • src/lang/hover/anime-hover-provider.ts
  • src/lang/maDiagnosticCollection.ts
  • src/lang/symbol/anime-symbol-provider.ts
  • src/list-parser/anl-parser-cache.ts
  • src/list-parser/anl-parser.ts
  • src/list-parser/line-context-finder.ts
  • src/list-parser/line-context.ts
  • src/list-parser/line-identifier.ts
  • src/list-parser/line-info.ts
  • src/list-parser/line-type.ts
  • src/services/mal.ts
  • src/types.ts
  • src/utils/date-utils.ts
  • src/utils/document-reader.ts
  • src/utils/editor-utils.ts
  • src/utils/time-utils.ts
  • src/utils/typescript-utils.ts
  • src/vscode-extension.ts
  • syntaxes/anime-list.tmLanguage.json
  • tasks/commit-plan-extension-rewrite.md
  • tasks/goal-extension-rewrite.md
  • tasks/prd-extension-rewrite.md
  • tsconfig.base.json
  • tsconfig.json
  • vitest.config.mjs
  • vsc-extension-quickstart.md

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
  • Commit unit tests in branch rewrite/modern-monorepo

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.

@marcuscastelo

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@marcuscastelo

Copy link
Copy Markdown
Owner Author

CodeRabbit scoped review

The PR-wide GitHub check still displays the free-plan 150-file limit, so the authenticated CodeRabbit CLI reviewed the substantive work in two scopes:

  • packages/core: no findings
  • apps/vscode-extension: findings listed below

Major

  • Use unique temporary Extension Host directories and remove them in finally.
  • Enforce the catalog response-size limit while streaming, including responses without Content-Length.
  • Serialize concurrent rate-limit reservations before invoking Jikan.
  • Return cancelled immediately when search receives an already-aborted signal.

Minor / trivial

  • Preserve completion replacement offsets and avoid duplicating existing : or ] delimiters.
  • Disable production source maps or include them consistently in the VSIX.
  • Surface spawnSync().error when unzip cannot be launched.
  • Replace one hard-coded completion-test cursor position with source.length.

Rejected finding

  • The suggested README-case change is a false positive. The generated archive contains extension/readme.md, and pnpm package:verify confirms that exact case-sensitive entry.

This comment records review output only; findings should be verified against current behavior before implementation.

@marcuscastelo
marcuscastelo merged commit 5e31711 into develop Jul 13, 2026
5 checks passed
@marcuscastelo
marcuscastelo deleted the rewrite/modern-monorepo branch July 13, 2026 01:33
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.

1 participant