convert to vite, typescript add some tests#282
Open
SharonStrats wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the project’s build/dev/test toolchain from Webpack/Jest/Babel to Vite/Vitest, while completing the TypeScript conversion and adding a small Vitest-based unit test suite to validate core chat-creation behavior.
Changes:
- Replace Webpack/Babel/Jest setup with Vite/Vitest configuration and scripts.
- Convert remaining JS usage patterns to TypeScript-friendly code (notably in chat pane implementations).
- Add initial Vitest unit tests for
create.tsandlongChatPane.mintNew.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.dev.config.mjs | Removed legacy Webpack dev configuration as part of the Vite migration. |
| vite.config.mts | Added Vite/Vitest configuration (build entry + jsdom test environment). |
| tsconfig.json | Adjusted TS module resolution for bundler/Vite usage and simplified typeRoots. |
| test/unit/longChatPane.test.ts | Removed placeholder Jest test. |
| test/longChatPane.test.ts | Added Vitest coverage for longChatPane.mintNew (graph + ACL writes). |
| test/jest.setup.ts | Removed Jest-specific setup. |
| test/helpers/setup.ts | Added Vitest global test setup (mock cleanup). |
| test/create.test.ts | Added Vitest coverage for getChat behavior (existing vs create/invite flows). |
| src/shortChatPane.ts | Strengthened typing and error handling around message store detection. |
| src/longChatPane.ts | Added TS types and refactors for side panels/options/thread handling. |
| src/index.ts | Added default export for local dev environment usage. |
| src/create.ts | Added return type assertion for mintNew result. |
| package.json | Updated entrypoints/exports and switched scripts to Vite/Vitest toolchain. |
| jest.config.mjs | Removed Jest configuration. |
| dev/index.js | Removed legacy dev harness entrypoint (Webpack-era). |
| dev/index.html | Removed legacy dev HTML (Webpack-era). |
| dev/context.ts | Removed legacy dev context wiring (Webpack-era). |
| babel.config.mjs | Removed Babel configuration (no longer used with Vite build). |
Comments suppressed due to low confidence (2)
src/longChatPane.ts:333
HTMLElement.styleis aCSSStyleDeclarationand isn’t meant to be assigned a CSS string. Assigning a string toarea.stylecan throw at runtime (modules are strict mode) and/or silently do nothing; usearea.style.cssText = ...orsetAttribute('style', ...)instead.
src/longChatPane.ts:366- If the user isn’t logged in, this handler returns after
participantsAreahas already been initialized, so subsequent clicks won’t rebuild the panel even after login (it will just toggle an empty panel). Also, the alert message contains typos. Checkmebefore creating/assigningparticipantsArea, and set the initial styles viacssTextrather than assigning to.style.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Migrate to vite.
There weren't really any tests so I just added a few so that I could setup the vite with the testing.
Also converted the other files that were still js to ts.