-
Notifications
You must be signed in to change notification settings - Fork 0
Bump dependencies and related bug fixes #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis update encompasses dependency upgrades across multiple packages and apps, refactors several custom Vite plugins, and introduces minor code and configuration cleanups. Notably, it replaces the Changes
Sequence Diagram(s)sequenceDiagram
participant Vite as Vite Build
participant Plugin as replaceJsonImports Plugin
participant FS as File System
Vite->>Plugin: Encounters import of JSON file
Plugin->>FS: Reads JSON file content
Plugin->>Plugin: Parses & replaces import with inline JSON AST node
Plugin-->>Vite: Returns transformed code
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
🔭 Outside diff range comments (1)
apps/website/src/hooks/local-storage.ts (1)
140-144:readValueis missing from theuseEffectdependency listOmitting
readValue(or its internal deps) risks stale reads whenoptions,initialValue, ordeserializerchange, becausereadValueis recreated viauseCallback. The linter-ignore hides a real risk rather than a purely stylistic warning.-// biome-ignore lint/correctness/useExhaustiveDependencies: _ -useEffect(() => { - setStoredValue(readValue()); -}, [key]); +useEffect(() => { + setStoredValue(readValue()); + // eslint-disable-next-line react-hooks/exhaustive-deps +}, [key, readValue]);Alternatively, memoise
optionsupstream soreadValueremains referentially stable, then keep[key]only.
♻️ Duplicate comments (4)
apps/website/src/app/(products)/products/browser-extension/page.tsx (4)
53-59: Reiteration of the previous comment for the Edge icon.
73-79: Reiteration of the previous comment for the Opera icon.
93-99: Reiteration of the previous comment for the Brave icon.
114-120: Reiteration of the previous comment for the Firefox icon.
🧹 Nitpick comments (8)
packages/helpers/src/create-logger/hex-to-ansi.ts (1)
24-36: Avoid rebuilding the 256-colour palette on every call
closestAnsiColourrecreates the Xterm 256-colour table each invocation (16 base + 216 cube + 24 greyscale). When called frequently (e.g., per-line logging), this allocates ~256 tuples and performs ~216 + 24 pushes every time, which is unnecessary GC churn.Consider computing the palette once at module load:
- const colours = [ - /* 16 base colours … */ - ] as [number, number, number][]; - - // Add 6x6x6 cube colours - for (let r1 = 0; r1 < 6; r1++) - for (let g1 = 0; g1 < 6; g1++) - for (let b1 = 0; b1 < 6; b1++) - colours.push([ /* … */ ]); - - // Add greyscale colours - for (let i = 0; i < 24; i++) - colours.push([ /* … */ ]); + const colours = buildPalette(); // memoised outside the function +function buildPalette(): [number, number, number][] { + const out: [number, number, number][] = [ + /* 16 base colours … */ + ]; + // build cube + greyscale … + return out; +}This reduces per-call overhead to O(256) arithmetic without repeated allocations.
apps/website/src/app/(products)/products/discord-bot/page.tsx (1)
25-30: Prefernext/imageover plain<img>for better performanceDisabling the Biome rule works, but you lose automatic optimisation (lazy-loading, responsive sizing, src-set generation, etc.) provided by
next/image. Unlessnext/imageis infeasible (e.g. the remote domain isn’t inimages.remotePatterns), consider switching:-{/** biome-ignore lint/performance/noImgElement: Want to use img */} -<img - src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png" - className="w-6" - alt="Discord Logo" -/> +{/* eslint-disable-next-line @next/next/no-img-element */} +<Image + src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png" + width={24} + height={24} + alt="Discord Logo" />If keeping
<img>, at least add explicitwidthandheightattributes to avoid layout shift.apps/website/src/components/material-icon.tsx (1)
22-24: Explicit size attributes help CLS when opting out ofnext/imageSince you’re intentionally using
<img>, add fixedwidth/height(orwidth={16} height={16}given.size-4) to prevent cumulative layout shift and appease Core Web Vitals.apps/website/src/app/(products)/products/browser-extension/page.tsx (1)
30-36: Considernext/image(or at least fixed dimensions) for the Chrome iconSame rationale as the Discord-bot page:
next/imageyields better perf, fallback is explicitwidth/height.apps/website/src/components/explorer/folder/item.tsx (1)
87-88: Good structural cleanup with minor text improvement neededThe removal of wrapper divs and direct use of
asChildimproves the component structure. However, the screen reader text should reflect that this is a folder, not a file.- <span className="sr-only">Rename File</span> + <span className="sr-only">Rename Folder</span>- <span className="sr-only">Delete File</span> + <span className="sr-only">Delete Folder</span>Also applies to: 99-100
apps/website/src/components/providers.tsx (1)
21-25: Style: constant should live above importsThe blank line forces the
importblock to start mid-file, which is atypical. Consider movingMAX_RETRIES/HTTP_STATUS_TO_NOT_RETRYbelow the import section to keep file structure conventional (imports → constants → components).apps/browser-extension/src/background/index.ts (1)
72-72: Good documentation of future improvement.The TODO comment clearly identifies a limitation where the filename is hardcoded instead of using a runtime-specific default. This helps track technical debt for future enhancement.
Would you like me to create an issue to track this TODO item for implementing the runtime default filename function?
apps/website/src/components/editor/execute-bar/index.tsx (1)
49-49: Minor typo in commentThe comment has a grammatical error.
- // biome-ignore lint/correctness/useExhaustiveDependencies: Once trigger once + // biome-ignore lint/correctness/useExhaustiveDependencies: Only trigger once
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (47)
apps/browser-extension/package.json(1 hunks)apps/browser-extension/src/background/index.ts(1 hunks)apps/browser-extension/src/content-script/execution/index.tsx(1 hunks)apps/browser-extension/vite-plugins.ts(3 hunks)apps/browser-extension/vite.config.chrome.ts(1 hunks)apps/browser-extension/vite.config.firefox.ts(1 hunks)apps/discord-bot/package.json(1 hunks)apps/discord-bot/src/commands/evaluate.ts(1 hunks)apps/discord-bot/src/components/edit-evaluation-button.ts(1 hunks)apps/discord-bot/src/components/evaluate-modal.ts(2 hunks)apps/discord-bot/src/events/application-authorised.ts(1 hunks)apps/discord-bot/src/handlers/evaluate.ts(5 hunks)apps/discord-bot/src/index.ts(4 hunks)apps/discord-bot/src/services/discord.ts(3 hunks)apps/discord-bot/src/utilities/session-context.ts(2 hunks)apps/website/next.config.js(1 hunks)apps/website/package.json(1 hunks)apps/website/src/app/(editor)/playgrounds/[playground]/wrapper/mobile.tsx(2 hunks)apps/website/src/app/(playgrounds)/playgrounds/playground-card.tsx(2 hunks)apps/website/src/app/(products)/products/browser-extension/page.tsx(5 hunks)apps/website/src/app/(products)/products/discord-bot/page.tsx(1 hunks)apps/website/src/components/editor/execute-bar/index.tsx(2 hunks)apps/website/src/components/editor/opened-files/button.tsx(1 hunks)apps/website/src/components/explorer/file/item.tsx(3 hunks)apps/website/src/components/explorer/folder/item.tsx(3 hunks)apps/website/src/components/explorer/name.tsx(1 hunks)apps/website/src/components/explorer/use.tsx(2 hunks)apps/website/src/components/header/index.tsx(1 hunks)apps/website/src/components/material-icon.tsx(1 hunks)apps/website/src/components/providers.tsx(1 hunks)apps/website/src/components/terminal/index.tsx(2 hunks)apps/website/src/hooks/local-storage.ts(2 hunks)biome.json(1 hunks)package.json(1 hunks)packages/components/package.json(1 hunks)packages/components/src/button.tsx(1 hunks)packages/components/src/form.tsx(1 hunks)packages/components/src/select.tsx(1 hunks)packages/engine/src/execute/arguments.ts(1 hunks)packages/helpers/src/create-logger/hex-to-ansi.ts(1 hunks)packages/hooks/package.json(1 hunks)packages/hooks/src/event-callback.ts(1 hunks)packages/shapes/package.json(1 hunks)packages/styles/package.json(1 hunks)packages/styles/src/styles.css(1 hunks)patches/@[email protected](1 hunks)pnpm-workspace.yaml(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (5)
apps/website/src/components/editor/opened-files/button.tsx (2)
apps/website/src/components/explorer/file/item.tsx (1)
Props(19-22)apps/website/src/components/explorer/name.tsx (1)
Props(21-25)
apps/website/src/components/explorer/file/item.tsx (4)
apps/website/src/components/editor/opened-files/button.tsx (1)
Props(11-14)apps/website/src/components/explorer/folder/item.tsx (1)
Props(27-29)apps/website/src/components/explorer/name.tsx (1)
Props(21-25)apps/website/src/components/terminal/index.tsx (1)
Props(24-26)
apps/browser-extension/vite.config.firefox.ts (1)
apps/browser-extension/vite-plugins.ts (1)
replaceJsonImports(50-86)
apps/website/src/components/editor/execute-bar/index.tsx (3)
apps/website/src/components/terminal/use.tsx (1)
useTerminal(22-26)packages/engine/src/execute/fetch.ts (1)
executeCode(17-60)packages/components/src/toast.tsx (1)
toast(31-31)
apps/discord-bot/src/events/application-authorised.ts (2)
apps/discord-bot/src/services/posthog.ts (1)
captureEvent(35-108)apps/discord-bot/src/utilities/session-context.ts (1)
getUserContext(22-30)
🔇 Additional comments (61)
apps/website/src/hooks/local-storage.ts (1)
4-5: Import change looks goodRe-ordering to group all React imports together keeps things consistent with common style guides.
apps/website/src/components/header/index.tsx (1)
136-136: Good change to improve event propagation.Removing the event handlers from this div allows events to properly bubble up to the SheetBody's onClick handler at line 134, which maintains the intended sheet closing behaviour whilst improving event flow consistency.
apps/website/src/app/(editor)/playgrounds/[playground]/wrapper/mobile.tsx (1)
23-23: Good improvement to event propagation.Removing the event handlers from these divs allows events to properly bubble up to the SheetBody onClick handlers, maintaining the intended sheet closing behaviour whilst improving event flow consistency with the header component changes.
Also applies to: 35-35
apps/website/src/components/editor/opened-files/button.tsx (1)
10-16: LGTM: Namespace export enables external type accessExporting the namespace makes the
Propsinterface available for external consumption, which is consistent with the pattern applied across other components in this PR.apps/website/src/components/terminal/index.tsx (1)
23-27: LGTM: Namespace export for external accessibilityExporting the namespace follows the consistent pattern applied across components in this PR.
apps/website/src/components/explorer/name.tsx (1)
20-26: LGTM: Consistent namespace export patternThe namespace export aligns with the coordinated changes across explorer components, enabling external access to type definitions.
apps/website/src/components/explorer/file/item.tsx (2)
18-24: LGTM: Namespace export for type accessibilityConsistent with the pattern across explorer components to enable external access to Props interfaces.
61-64: Good cleanup: Removed redundant role attributesRemoving
role="button"from the div wrappers is correct since theButtoncomponent withasChildprop already provides the proper button semantics. This eliminates redundant ARIA declarations.Also applies to: 75-78
apps/website/src/components/explorer/folder/item.tsx (1)
26-30: LGTM: Consistent namespace exportFollows the established pattern across explorer components for external type access.
packages/hooks/package.json (1)
18-20: Dependency bump looks goodThe dev-dependency upgrade to
@types/react@^19.1.8is non-breaking and keeps versions in sync with the other packages. No further action needed.packages/shapes/package.json (1)
18-20: Major-version upgrade ofzodneeds validationJumping from
3.x→4.0.5is a breaking change. Please run the full type-check/test suite (or at least grep for removed APIs such asZodOptionalType._def) to confirm no runtime or typing regressions were introduced.packages/components/src/select.tsx (1)
5-10: Minor import reorder onlySwapping
ChevronsUpDownIconandChevronUpIconhas no functional impact. All usages still compile.packages/engine/src/execute/arguments.ts (1)
1-1: Import re-ordering is harmlessRe-ordering
longShortStrategyahead ofParseris style-only and still aligns with usage below.packages/components/src/button.tsx (1)
2-2: LGTM! Import reordering looks good.This cosmetic change improves consistency by placing runtime imports before type-only imports.
package.json (2)
20-20: LGTM! Safe @types/node patch update.The @types/node update from ^22.14.1 to ^22.16.4 is a safe patch version bump.
18-18: Safe upgrade: Biome v2.1.1 compatibility verifiedThe existing
biome.jsonschema and CLI commands remain unchanged under v2.1.1, and your lint/format scripts continue to work as expected.•
biome.jsonfound and references the v2 schema
•pnpm biome check --helplists the same flags and usage
•lint&formatscripts inpackage.jsonstill invokebiome check . --writewithout errorsNo further changes needed.
packages/styles/package.json (1)
11-12: LGTM! Safe dependency version bumps.Both dependency updates follow semantic versioning:
tailwindcsspatch update (^4.1.4 → ^4.1.11) should be backwards compatibletw-animate-cssminor update (^1.2.5 → ^1.3.5) maintains API compatibilityThese align well with the coordinated Tailwind updates across the monorepo mentioned in the AI summary.
packages/hooks/src/event-callback.ts (1)
23-25: LGTM! Correct performance optimisation.Changing the dependency array from
[ref]to[]is a valid optimisation. Therefobject returned byuseRefis stable across renders, and since the callback accessesref.currentat call time (not creation time), there's no need to recreate the callback when the ref object changes.This eliminates unnecessary callback recreations while maintaining the same functionality.
apps/discord-bot/package.json (4)
21-21: LGTM! Safe minor version bump for @buape/carbon.The update from 0.7.0 to 0.9.0 is a minor version change that should maintain backwards compatibility.
25-25: LGTM! Safe minor version bump for @t3-oss/env-core.The update from ^0.12.0 to ^0.13.8 follows semantic versioning and should be backwards compatible.
27-27: LGTM! Safe patch version bump for es-toolkit.The update from ^1.34.1 to ^1.39.7 is a patch version change that should be safe.
28-29: Verify API compatibility for posthog-node v5 and Zod v4apps/discord-bot/package.json:
"posthog-node": "^5.5.1", "zod": "4.0.5"Key areas to double-check:
services/posthog.ts
• Instantiation:new PostHog(env.POSTHOG_KEY!, { host, flushAt, flushInterval, persistence })
• Method calls:posthog.capture(...)andposthog.shutdown()
Confirm these options and methods haven’t been renamed or removed in v5.apps/discord-bot/src/env.ts (via createEnv)
• Schema definitions:z.url().transform(...),z.string().optional(),.array(), etc.
Ensure these Zod v4 APIs still behave as expected when parsing runtime and server env variables.packages/components/src/form.tsx (1)
16-16: Excellent type safety improvement!Adding the explicit type annotation ensures
Formmaintains the exact same type asFormProvider, preventing potential type drift and making the type relationship explicit. This is a solid defensive programming practice.packages/components/package.json (1)
19-40: Run vulnerability audit with a lockfile in place
- packages/components/package.json
• @radix-ui/[email protected] and @radix-ui/[email protected] were last modified on 10 July 2025 (recent stable releases).
• [email protected] peer-dependency supports React ^16.8.0 – ^19, so React ^19.1.0 is compatible.- No lockfile detected, so
npm auditcould not run.Action: Commit your lockfile (package-lock.json or yarn.lock) and re-run
npm audit --audit-level moderateto ensure there are no known vulnerabilities before merging.apps/website/src/app/(playgrounds)/playgrounds/playground-card.tsx (2)
16-16: Good import organisation improvement.Reordering the import to place the type import after the function import improves readability and follows common TypeScript conventions.
29-32: Nice readability improvement with multiline props type.Converting the inline props type to a multiline object type annotation significantly improves readability, especially for components with multiple props. This is a great formatting choice.
apps/website/package.json (1)
14-65: All dependency updates are compatible.
- No peer dependency warnings were reported.
- React (^19.1.0) satisfies @tanstack/react-query’s
^18 || ^19requirement.- @uiw/react-codemirror’s peer deps (React ≥16.8.0, React-DOM ≥16.8.0) are met.
- Next.js is correctly pinned at 15.3.5 per the config’s “15.4.x bug” note.
No further action required.
apps/website/next.config.js (1)
1-2: Next.js issue #81628 is still open
The referenced GitHub issue remains open, so retaining the TODO comment and locking the version is appropriate. We can revisit and remove this TODO once the issue is resolved.apps/website/src/components/explorer/use.tsx (1)
33-33: Good improvement to code documentation.The updated biome-ignore comments provide clearer context for why exhaustive dependencies are intentionally omitted in these hooks, improving code readability and maintainability.
Also applies to: 103-103
biome.json (4)
3-11: Improved file inclusion pattern.The change from ignore patterns to explicit includes with negations provides clearer control over which files are processed by biome.
24-41: Well-organised linter rule structure.The categorisation of linter rules into specific groups (a11y, complexity, correctness, etc.) improves maintainability and makes it easier to understand which rules are configured.
43-49: Correct placement for organizeImports setting.Moving
organizeImportstoassist.actions.sourcewith the value"on"aligns with the proper biome configuration schema.
17-18: Verify “expand”: “auto” support in your Biome versionI wasn’t able to find the
"expand"option in any of the local Biome JSON schemas undernode_modules. Before merging, please:
- Confirm your installed Biome version (
npx biome --version) and check its official docs or changelog for the"expand"formatter setting- If it isn’t supported, remove the
"expand": "auto"entry or upgrade Biome to a version that introduces itpackages/styles/src/styles.css (1)
1-1: Simplified Tailwind CSS import aligns with build updates.Removing the
source(none)directive is consistent with the build tooling improvements mentioned in the PR. The updated Vite plugins should handle Tailwind imports properly without this directive.apps/browser-extension/vite.config.chrome.ts (1)
10-10: Appropriate plugin replacement for improved JSON import handling.The replacement of
removeImportAttributeswithreplaceJsonImportsaligns with the build tooling improvements in this PR. The new plugin should provide better handling of JSON imports by inlining content rather than just removing attributes.Also applies to: 16-16
apps/discord-bot/src/components/edit-evaluation-button.ts (1)
9-9: LGTM: Custom ID separator updated consistently.The change from colon to comma separator in the custom ID aligns with the broader standardisation effort across the Discord bot components.
apps/browser-extension/vite.config.firefox.ts (1)
10-10: LGTM: Plugin upgrade improves JSON import handling.The replacement of
removeImportAttributeswithreplaceJsonImportsis a good improvement. The new plugin uses proper AST parsing instead of regex manipulation, making it more robust and maintainable.Also applies to: 16-16
apps/discord-bot/src/components/evaluate-modal.ts (1)
14-14: LGTM: Custom ID separators updated consistently.Both modal classes have been updated to use comma separators instead of colons, maintaining consistency with the broader Discord bot component standardisation effort.
Also applies to: 47-47
apps/discord-bot/src/commands/evaluate.ts (1)
9-9: LGTM: Component registration centralised properly.Removing the unused imports simplifies the command class and aligns with the refactoring that centralises component registration in the Discord service layer.
apps/discord-bot/src/services/discord.ts (4)
3-7: LGTM - Clean component importsThe addition of UI component imports aligns well with the service restructuring to centralise component registration.
32-32: LGTM - Proper component registrationAdding
EditEvaluationButtonto the components array follows the correct Carbon framework pattern for UI component registration.
39-39: LGTM - Service export refactoringExporting the client instance directly instead of a boolean flag provides better encapsulation and simplifies usage in the main handler.
36-37: Verify null safety for modal registrationThe modal registration loop doesn't check if
clientis null before callingmodalHandler.registerModal(), which could cause runtime errors when Discord environment variables are missing.Apply this diff to add proper null safety:
-for (const modal of [new EvaluateModal(), new EvaluateModalEdit()]) - client?.modalHandler.registerModal(modal); +if (client) { + for (const modal of [new EvaluateModal(), new EvaluateModalEdit()]) + client.modalHandler.registerModal(modal); +}Likely an incorrect or invalid review comment.
apps/browser-extension/package.json (2)
30-30: No further zod v4 changes requiredAll zod usage in apps/browser-extension/src/env.ts has been updated to v4 (importing from ‘zod/v4’ and using z.url(), z.string().min(1).optional(), etc.). No other zod imports or parsing calls were found in the extension. No breaking‐change fixes are needed.
21-21: @t3-oss/env-core 0.13.8 compatibility verifiedThe only breaking change in the 0.13.x line is that validators must now implement the Standard Schema interface (instead of Zod-only). Since your code still uses Zod v4 schemas with
createEnvexactly as before, it continues to work without modification.• apps/browser-extension/src/env.ts: continues to import Zod and call
createEnv({ … })—no update needed.apps/browser-extension/src/content-script/execution/index.tsx (1)
8-8: LGTM - Clean parameter declarationThe consolidation of the function parameter destructuring and type annotation to a single line improves readability whilst maintaining the same functionality and type safety.
apps/discord-bot/src/utilities/session-context.ts (1)
22-22: LGTM - Flexible parameter typingExpanding the parameter type to support both raw API data and wrapped User instances provides good flexibility for the updated @buape/carbon integration.
apps/discord-bot/src/index.ts (3)
2-4: LGTM - Explicit .js extensionsAdding explicit
.jsextensions to imports improves ES module compatibility and aligns with modern JavaScript standards.
7-7: LGTM - Consistent service referenceThe update to use the
discordservice reference aligns well with the service restructuring indiscord.ts.
52-52: Verify external eventHandler.handleEvent signature
I couldn’t find a local definition ofhandleEvent—it’s provided by the@buape/carbonClient. Please confirm that in the version you’re using,eventHandler.handleEventaccepts two arguments(event, event.type).
• Ensure theClient(from@buape/carbon)eventHandler.handleEventmethod signature matches this call
• If it only accepts one parameter, update the call or upgrade the library accordinglyapps/discord-bot/src/handlers/evaluate.ts (3)
27-27: Consistent interaction ID format updateThe change from colon (
:) to comma (,) separators in custom IDs aligns with the broader refactoring across the Discord bot components.Also applies to: 30-30, 37-37, 41-41
74-74: Verify the reflection pattern usageThe use of
Reflect.setto modify the interaction's custom_id is unconventional. This modifies the raw data object directly, which could have unintended side effects.Consider using a more explicit approach or documenting why this reflection pattern is necessary here.
83-92: Good addition of ephemeral flags for error messagesAdding
MessageFlags.Ephemeralto error responses ensures that error messages are only visible to the user who triggered the interaction, preventing unnecessary clutter in the channel.apps/website/src/components/editor/execute-bar/index.tsx (2)
57-87: Good code organisation improvementMoving the mutation setup closer to the component top improves readability by grouping related state management logic together.
123-123: Correct dependency array updateAdding
mutateto the dependency array ensures the callback is updated when the mutation function changes, preventing potential stale closures.apps/discord-bot/src/events/application-authorised.ts (3)
2-3: Improved type safety with specific listener classUsing the specific
ApplicationAuthorizedListenerbase class instead of genericListenerprovides better type safety and removes the need for explicit type declaration.Also applies to: 9-9
11-11: Correct TypeScript syntax for indexed typesThe change from angle brackets to square brackets is the correct TypeScript syntax for accessing indexed types.
13-22: Verify ApplicationAuthorisedListener conditionsPlease double-check that the new
data.guildanddata.userproperties exactly correspond to the previousintegration_typevalues for theApplicationAuthorizedwebhook payload. Confirm in theListenerEventData[ApplicationWebhookEventType.ApplicationAuthorized]definition (from@buape/carbon) that:
data.guildis present only when the install is a guild integrationdata.useris present only when the install is a user integrationIf those mappings hold true, the refactored condition is safe to approve.
apps/browser-extension/vite-plugins.ts (2)
1-2: Required imports for file operationsThe addition of Node.js fs and path modules is necessary for the new JSON file reading functionality.
Also applies to: 6-6
23-25: AST parsing configuration updateGood addition of required Babel plugins for parsing modern JavaScript/TypeScript syntax.
patches/@[email protected] (1)
6-7: Defensive optional chaining forcss.devSourcemapThe
devSourcemapflag in @tailwindcss/vite controls whether CSS source maps are generated in development builds. Because users may not define acssblock in their Vite config (leavingconfig.cssundefined), adding?.ensures we don’t throw ifcssisn’t present.• File: patches/@[email protected]
• Lines: 6–7 (changede?.css.devSourcemaptoe?.css?.devSourcemap)This change is appropriate and can be merged.
apps/website/src/app/(editor)/playgrounds/[playground]/wrapper/mobile.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
apps/browser-extension/vite-plugins.ts (1)
69-70: Path validation implementation looks good.The security validation follows the user's preferred formatting style without braces and provides appropriate protection against path traversal attacks.
🧹 Nitpick comments (1)
apps/browser-extension/vite-plugins.ts (1)
47-49: Update the JSDoc comment to match the implementation.The comment mentions "JSON imports with attributes" but the implementation handles any JSON imports, not specifically those with import attributes.
-/** - * Vite plugin to inline JSON imports with attributes as const declarations. - */ +/** + * Vite plugin to inline JSON imports as const declarations. + */
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/browser-extension/vite-plugins.ts(3 hunks)apps/website/src/app/(editor)/playgrounds/[playground]/wrapper/mobile.tsx(2 hunks)apps/website/src/components/terminal/index.tsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- apps/website/src/components/terminal/index.tsx
- apps/website/src/app/(editor)/playgrounds/[playground]/wrapper/mobile.tsx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: apteryxxyz
PR: apteryxxyz/Evaluate#95
File: apps/browser-extension/vite-plugins.ts:69-69
Timestamp: 2025-07-16T23:10:33.941Z
Learning: In the Evaluate codebase, apteryxxyz prefers to let errors throw naturally in internal Vite plugins rather than adding explicit error handling, as it's acceptable for development tooling to fail fast and surface errors clearly.
Learnt from: apteryxxyz
PR: apteryxxyz/Evaluate#95
File: apps/browser-extension/vite-plugins.ts:50-86
Timestamp: 2025-07-16T23:10:36.498Z
Learning: User apteryxxyz prefers if statements without braces when there's a single statement, formatting them as:
if (condition)
statement;
instead of using curly braces around the statement.
apps/browser-extension/vite-plugins.ts (3)
Learnt from: apteryxxyz
PR: apteryxxyz/Evaluate#95
File: apps/browser-extension/vite-plugins.ts:69-69
Timestamp: 2025-07-16T23:10:33.941Z
Learning: In the Evaluate codebase, apteryxxyz prefers to let errors throw naturally in internal Vite plugins rather than adding explicit error handling, as it's acceptable for development tooling to fail fast and surface errors clearly.
Learnt from: apteryxxyz
PR: apteryxxyz/Evaluate#95
File: packages/helpers/src/create-logger/hex-to-ansi.ts:40-45
Timestamp: 2025-07-16T23:10:34.848Z
Learning: The maintainer apteryxxyz is okay with using the comma operator in conditional statements like `if (condition) (assignment1), (assignment2);` in the Evaluate codebase, as seen in packages/helpers/src/create-logger/hex-to-ansi.ts.
Learnt from: apteryxxyz
PR: apteryxxyz/Evaluate#95
File: apps/browser-extension/vite-plugins.ts:50-86
Timestamp: 2025-07-16T23:10:36.498Z
Learning: User apteryxxyz prefers if statements without braces when there's a single statement, formatting them as:
if (condition)
statement;
instead of using curly braces around the statement.
🔇 Additional comments (3)
apps/browser-extension/vite-plugins.ts (3)
1-2: LGTM: Clean import additions for new functionality.The addition of Node.js filesystem imports and namespace import for Babel types properly supports the new JSON inlining functionality.
Also applies to: 6-6, 8-8
23-36: LGTM: Consistent usage of namespace imports.The updates to use
t.isArrowFunctionExpression,t.isBlockStatement,t.isIfStatement, andt.isReturnStatementalign well with the new namespace import pattern for Babel types.
77-77: Ignore suggestion:t.valueToNodehandles JSON.parse valuesJSON.parse only produces primitives, arrays, nested objects and null—all of which
@babel/types’ valueToNode supports. No additional tests are required.Likely an incorrect or invalid review comment.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores