Skip to content

chore(site): remove dead code and an import cycle - #31690

Draft
DanielleMaywood wants to merge 1 commit into
deployment-config-required-fieldsfrom
site-dead-code-cleanup
Draft

DanielleMaywood wants to merge 1 commit into
deployment-config-required-fieldsfrom
site-dead-code-cleanup

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Contributor

Fixes dead code and an import cycle that fallow reports and knip does not, so that #31634 can replace knip and still pass on main. Behavior does not change.

  • Delete scripts/warmup-storybook-cache.mjs. chore(Makefile): drop test-storybook from pre-push #29078 removed its only caller, in the Makefile.
  • Delete src/__mocks__/{js-untar,monaco-editor}.ts. Vitest does not read src/__mocks__, and no test calls vi.mock for these modules.
  • Remove the unused SmoothTextEngine.reset and TarReader.getFileBlob, and the private helper that only getFileBlob called.
  • Remove the workspaceCount prop of AgentCreateForm. The component never read it.
  • Break the import cycle between chatStore.ts and useChatStore.ts: drop the re-export and import useChatStore directly.
  • Rename the local SkillMetadata to SkillSummary, now Pick<SkillMetadata, "name" | "description">, so it no longer has the same name as the generated type.
  • Remove the export from loadRedirects, which only its own file uses.
  • Move @coder/pixel-storybook to dependencies, because src/components/Spinner/Spinner.tsx imports it.

Stacked on #31689. #31634 is stacked on this PR.


🤖 This PR was generated by Coder Agents on behalf of @DanielleMaywood.

Delete an unused script and two unused __mocks__ files, remove unused
class members and the unread workspaceCount prop, import useChatStore
directly to break the chatStore cycle, rename the local SkillMetadata
to SkillSummary so it no longer shadows the generated type, and move
@coder/pixel-storybook to dependencies because Spinner.tsx imports it.

This branch has not been deployed

No deployments
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