Skip to content

refactor: remove unused document re-exports and types - #51

Merged
rororowyourboat merged 1 commit into
developfrom
refactor/remove-unused-document-exports
Nov 23, 2026
Merged

rororowyourboat merged 1 commit into
developfrom
refactor/remove-unused-document-exports

Conversation

@HuiJun

@HuiJun HuiJun commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Removes exports of src/lib/workspace/documents that nothing imports. No user-visible change.

  • documents/schema.ts: the re-export of DocumentDefinitionSchema. Its two consumers (project/index.ts, project/schema.ts) use the original in project/schema.ts.
  • documents/index.ts: the re-export of readRenderedDocument. The module still imports and calls it internally; RenderedDocumentSchema stays re-exported because it is imported elsewhere.
  • documents/index.ts: the types DocumentReference, DocumentContent and DocumentDiagnostic, plus the three schema imports only they used. The schemas themselves stay in documents/schema.ts, where RenderedDocumentSchema is composed from them.

Nothing depends on them:

  • git grep -w for each name over src, tests, examples and scripts finds no use outside the declarations removed here (the three types matched only their own definition).
  • knip reports each as an unused export or unused exported type.
  • tsc --noEmit passes with noUnusedLocals, so no import was left dangling.

Evidence

Run locally on Node 26.3.1 with this removal applied together with the two other dead-code removals proposed alongside it (unused createBrowserWorkspace, unused .diagram-slot styles):

  • npm run check — passed (prettier, architecture check, tsc --noEmit, Vitest, Node script tests).
  • npm run build — passed.

Browser suites were not run locally: only type-level and re-export declarations changed.

Compatibility

No source/model/view, saved-format, dependency or engine-profile effect. Rendered-document validation is unchanged.


🟢 Devin Review found nothing to fix · View findings

Devin Review

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@rororowyourboat
rororowyourboat merged commit ce2e073 into develop Nov 23, 2026
1 check passed
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.

2 participants