Skip to content

Upgrade React ecosystem dependencies to v19#3247

Merged
RichDom2185 merged 46 commits intomasterfrom
react-19
Mar 16, 2026
Merged

Upgrade React ecosystem dependencies to v19#3247
RichDom2185 merged 46 commits intomasterfrom
react-19

Conversation

@RichDom2185
Copy link
Copy Markdown
Member

@RichDom2185 RichDom2185 commented Jul 14, 2025

Description

As per title. Upgrades React to v19, as well as the other related dependencies that must be upgraded together.

Also migrated from react-sortable-hoc to dnd-kit since the former is no longer maintained and broken as of React 19.

How to test

Everything should still work.

Checklist

  • I have tested this code

@RichDom2185 RichDom2185 self-assigned this Jul 14, 2025
@source-academy source-academy deleted a comment from coderabbitai Bot Aug 10, 2025
@RichDom2185 RichDom2185 marked this pull request as ready for review March 16, 2026 12:05
@RichDom2185 RichDom2185 requested review from Copilot and sayomaki March 16, 2026 12:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the frontend to React 19 and adjusts TypeScript + tests/snapshots to match the new React typings and rendering behavior (migrating away from react-test-renderer/shallow rendering toward Testing Library).

Changes:

  • Upgraded react, react-dom, react-konva and related @types/*; removed react-test-renderer.
  • Reworked test utilities and many unit tests to use @testing-library/react rendering + updated snapshots.
  • Tightened typings across the codebase (notably refs and JSX-related typing imports) to satisfy updated React/TS types.

Reviewed changes

Copilot reviewed 96 out of 97 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
yarn.lock Dependency lock updates for React 19/tooling
package.json React 19 + types bumps; remove react-test-renderer
src/pages/sicp/subcomponents/SicpExercise.tsx JSX typing import adjustment
src/pages/sicp/subcomponents/chatbot/ChatBox.tsx Ref type updated to allow null
src/pages/sicp/subcomponents/tests/SicpLatex.test.tsx Switch to renderTree snapshots
src/pages/sicp/subcomponents/tests/CodeSnippet.test.tsx Switch to Testing Library render + snapshots
src/pages/sicp/subcomponents/tests/snapshots/SicpToc.test.tsx.snap Snapshot updated for DOM fragment output
src/pages/sicp/subcomponents/tests/snapshots/SicpLatex.test.tsx.snap Snapshot updated for DOM fragment output
src/pages/sicp/subcomponents/tests/snapshots/SicpExercise.test.tsx.snap Snapshot updated for DOM fragment output
src/pages/sicp/subcomponents/tests/snapshots/CodeSnippet.test.tsx.snap Snapshot updated for DOM fragment output
src/pages/sicp/Sicp.tsx Ref callback formatting (block body)
src/pages/sicp/tests/Sicp.test.tsx Switch to renderTree snapshots
src/pages/sicp/tests/snapshots/Sicp.test.tsx.snap Snapshot updated for DOM fragment output
src/pages/playground/tests/snapshots/Playground.test.tsx.snap Snapshot updated (aria attribute changes)
src/pages/githubCallback/tests/GitHubCallback.test.tsx JSX typing import adjustment
src/pages/academy/gameSimulator/subcomponents/assetViewer/AssetViewerUtils.tsx JSX type import added
src/pages/academy/gameSimulator/subcomponents/assetViewer/AssetViewer.tsx JSX typing import adjustment
src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx Ref initialization + optional chaining export
src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx Ref initialization + optional chaining export
src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx Grid API ref init updated
src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx JSX typing import adjustment
src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx JSX typing import adjustment
src/features/sicp/parser/ParseJson.tsx JSX typing import + ref callback formatting
src/features/sicp/errors/SicpErrors.tsx JSX type import added
src/features/sicp/errors/tests/SicpErrors.test.tsx Switch to renderTree snapshots + assertions
src/features/sicp/errors/tests/snapshots/SicpErrors.test.tsx.snap Snapshot updated for DOM fragment output
src/features/dataVisualizer/tree/Tree.tsx JSX type import added
src/features/dataVisualizer/tree/FunctionTreeNode.tsx JSX type import added
src/features/dataVisualizer/tree/DrawableTreeNode.tsx JSX type import added
src/features/dataVisualizer/tree/ArrayTreeNode.tsx JSX type import added
src/features/dataVisualizer/dataVisualizerTypes.ts JSX type import added
src/features/dataVisualizer/dataVisualizer.tsx JSX type import added
src/features/cseMachine/CseMachineLayout.tsx RefObject types updated to include null
src/features/cseMachine/components/values/GlobalFnValue.tsx Konva Label ref types updated to include null
src/features/cseMachine/components/values/FnValue.tsx Konva Label ref types updated to include null
src/features/cseMachine/components/values/ContValue.tsx Konva Label ref types updated to include null
src/features/cseMachine/components/Text.tsx Konva Label ref types updated to include null
src/features/cseMachine/components/arrows/GenericArrow.tsx Konva refs updated to include null
src/features/cseMachine/tests/snapshots/CseMachineAnimation.test.tsx.snap Snapshot updated (ref output)
src/features/cseMachine/tests/snapshots/CseMachine.test.tsx.snap Snapshot updated (ref output)
src/commons/utils/TestUtils.ts Replace shallow renderer with Testing Library helpers
src/commons/utils/notifications/NotificationsHelper.ts JSX type import added
src/commons/utils/Hooks.ts RefObject param updated to include null
src/commons/utils/CopyToClipboard.tsx Relax typing around cloneElement/child props
src/commons/utils/tests/TestUtils.test.tsx Remove shallowRender test; keep deepFilter tests
src/commons/sourceRecorder/SourceRecorderEditor.tsx RefObject type updated to include null
src/commons/sourceRecorder/SourceRecorderControlBar.tsx RefObject type updated to include null
src/commons/sideContent/SideContentTypes.ts JSX type import added
src/commons/sideContent/SideContentProvider.tsx JSX type import added
src/commons/sideContent/SideContent.tsx JSX type import added
src/commons/sideContent/content/SideContentContestVoting.tsx Ref callback formatting (block body)
src/commons/sideContent/content/githubAssessments/SideContentMarkdownEditor.tsx Add typed node ref
src/commons/sideContent/tests/SideContentContestLeaderboard.test.tsx Switch to Testing Library snapshots
src/commons/sideContent/tests/SideContentAutograder.test.tsx Switch to Testing Library snapshots + queries
src/commons/sideContent/tests/snapshots/SideContentHtmlDisplay.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/sideContent/tests/snapshots/SideContentContestVoting.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/sideContent/tests/snapshots/SideContentContestLeaderboard.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/sideBar/SideBar.tsx JSX typing import adjustment
src/commons/repl/ReplInput.tsx JSX typing import adjustment
src/commons/repl/Repl.tsx JSX typing import adjustment
src/commons/repl/tests/Repl.test.tsx Reworked snapshots (currently not rendering)
src/commons/repl/tests/snapshots/Repl.test.tsx.snap Snapshot content changed to element props/DOM output
src/commons/profile/Profile.tsx Use satisfies React.FC + JSX typing import
src/commons/navigationBar/subcomponents/tests/SicpNavigationBar.test.tsx Switch to Testing Library + router wrapper
src/commons/navigationBar/subcomponents/tests/AcademyNavigationBar.test.tsx Switch to Testing Library + real store/router
src/commons/navigationBar/subcomponents/tests/snapshots/SicpNavigationBar.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/navigationBar/subcomponents/tests/snapshots/NavigationBarLangSelectButton.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/navigationBar/tests/NavigationBar.test.tsx Switch to Testing Library + store/router context
src/commons/mobileWorkspace/mobileSideContent/MobileSideContent.tsx JSX typing import adjustment
src/commons/fileSystemView/FileSystemViewContextMenu.tsx JSX typing import adjustment
src/commons/editor/tests/Editor.test.tsx Render with Provider + renderTree snapshots
src/commons/editor/tests/snapshots/Editor.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/dropdown/DropdownCreateCourse.tsx Use satisfies React.FC
src/commons/dropdown/DropdownCourses.tsx Use satisfies React.FC
src/commons/dropdown/tests/Dropdown.test.tsx Remove react-test-renderer structure asserts; snapshot only
src/commons/dropdown/tests/snapshots/Dropdown.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/delay/Delay.tsx JSX typing import adjustment
src/commons/controlBar/ControlBarShareButton.tsx RefObject type updated to include null
src/commons/controlBar/ControlBar.tsx JSX typing import adjustment
src/commons/ContentDisplay.tsx JSX typing import adjustment
src/commons/assessmentWorkspace/tests/AssessmentWorkspace.test.tsx Switch snapshot to Testing Library fragment
src/commons/assessmentWorkspace/tests/snapshots/AssessmentWorkspace.test.tsx.snap Snapshot updated (aria attr changes)
src/commons/assessment/Assessment.tsx JSX typing import adjustment
src/commons/assessment/tests/Assessment.test.tsx Prefer findBy* async queries over manual act
src/commons/application/tests/Application.test.tsx Switch to Testing Library + store/router
src/commons/application/tests/snapshots/Application.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/achievement/control/GoalEditor.tsx JSX typing import adjustment
src/commons/achievement/control/AchievementEditor.tsx JSX typing import adjustment
src/commons/tests/snapshots/Markdown.test.tsx.snap Snapshot updated for DOM fragment output
src/commons/tests/snapshots/ContentDisplay.test.tsx.snap Snapshot updated for DOM fragment output
Comments suppressed due to low confidence (3)

src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx:66

  • React.useRef<GridApi>(null) will typically pick the RefObject overload (where current can be treated as read-only), but onGridReady assigns to gridApi.current. To keep current safely mutable after the React/@types upgrade, prefer React.useRef<GridApi | null>(null) (or revert to React.useRef<GridApi>() + optional chaining).
    src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx:65
  • React.useRef<GridApi>(null) can resolve to the RefObject overload (where current may be treated as read-only), but onGridReady assigns gridApi.current = params.api. Use React.useRef<GridApi | null>(null) (mutable) or keep the previous useRef<GridApi>() pattern to avoid TS errors.
    src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx:100
  • React.useRef<GridApi<AssessmentConfiguration>>(null) may pick the RefObject overload (where current may be treated as read-only), but this ref is mutated in multiple places (gridApi.current?...). Make it explicitly mutable by using React.useRef<GridApi<AssessmentConfiguration> | null>(null) (or initialize with undefined).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commons/utils/TestUtils.ts
Comment thread src/commons/repl/__tests__/Repl.test.tsx
Comment thread src/features/sicp/errors/__tests__/SicpErrors.test.tsx
@sayomaki
Copy link
Copy Markdown
Contributor

@sentry review this

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 16, 2026

Pull Request Test Coverage Report for Build 23145267133

Details

  • 16 of 20 (80.0%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 41.321%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/utils/CopyToClipboard.tsx 0 2 0.0%
src/pages/sicp/Sicp.tsx 0 2 0.0%
Totals Coverage Status
Change from base Build 23140149423: 0.1%
Covered Lines: 5433
Relevant Lines: 12224

💛 - Coveralls

@sayomaki
Copy link
Copy Markdown
Contributor

@coderabbitai review this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

@sayomaki Sure, I'll review this PR now!

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

Walkthrough

This pull request modernizes the codebase by upgrading React to v19, replacing drag-and-drop libraries from react-sortable-hoc to @dnd-kit, improving type safety via explicit JSX imports and nullable ref types, and refactoring tests to use React Testing Library instead of shallow rendering utilities.

Changes

Cohort / File(s) Summary
Dependency Updates
package.json
Upgraded React and react-dom to ^19.2.4, updated react-konva to ^19.0.7, added @dnd-kit/core and @dnd-kit/sortable, removed react-sortable-hoc and react-test-renderer with type definitions.
Explicit JSX Type Imports
src/commons/.../ContentDisplay.tsx, src/commons/achievement/control/.../Editor.tsx, src/commons/assessment/.../Assessment.tsx, src/commons/controlBar/.../ControlBar.tsx, src/commons/delay/Delay.tsx, src/commons/fileSystemView/FileSystemViewContextMenu.tsx, src/commons/mobileWorkspace/.../MobileSideContent.tsx, src/commons/repl/.../Repl.tsx, src/commons/repl/ReplInput.tsx, src/commons/sideBar/SideBar.tsx, src/commons/sideContent/SideContent.tsx, src/commons/sideContent/SideContentProvider.tsx, src/commons/sideContent/SideContentTypes.ts, src/commons/utils/notifications/NotificationsHelper.ts, src/features/dataVisualizer/dataVisualizer.tsx, src/features/dataVisualizer/tree/...Node.tsx, src/features/sicp/errors/SicpErrors.tsx, src/pages/academy/.../...Panel.tsx, src/pages/academy/gameSimulator/.../AssetViewer.tsx, src/pages/githubCallback/__tests__/GitHubCallback.test.tsx, src/pages/sicp/Sicp.tsx, src/pages/sicp/subcomponents/SicpExercise.tsx
Added explicit type-only imports of JSX from React across numerous components and utility files to enable type-safe JSX.Element annotations.
Component Declaration Refactoring
src/commons/dropdown/DropdownCourses.tsx, src/commons/dropdown/DropdownCreateCourse.tsx, src/commons/profile/Profile.tsx
Changed component declarations from explicit React.FC<Props> type annotations to using satisfies React.FC<Props> assertions, maintaining functional equivalence while adjusting type-checking approach.
Ref Type Nullable Updates
src/commons/controlBar/ControlBarShareButton.tsx, src/commons/sideContent/content/githubAssessments/SideContentMarkdownEditor.tsx, src/commons/sourceRecorder/SourceRecorderControlBar.tsx, src/commons/sourceRecorder/SourceRecorderEditor.tsx, src/commons/utils/Hooks.ts, src/features/cseMachine/CseMachineLayout.tsx, src/features/cseMachine/components/Text.tsx, src/features/cseMachine/components/arrows/GenericArrow.tsx, src/features/cseMachine/components/values/ContValue.tsx, src/features/cseMachine/components/values/FnValue.tsx, src/features/cseMachine/components/values/GlobalFnValue.tsx, src/pages/sicp/subcomponents/chatbot/ChatBox.tsx
Updated ref type declarations to allow nullable values (e.g., RefObject<T> to RefObject<T | null>), aligning with potential null initial states and improving type safety.
Test Infrastructure Migration
src/commons/application/__tests__/Application.test.tsx, src/commons/assessment/__tests__/Assessment.test.tsx, src/commons/assessmentWorkspace/__tests__/AssessmentWorkspace.test.tsx, src/commons/dropdown/__tests__/Dropdown.test.tsx, src/commons/editor/__tests__/Editor.test.tsx, src/commons/navigationBar/__tests__/NavigationBar.test.tsx, src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.test.tsx, src/commons/navigationBar/subcomponents/__tests__/SicpNavigationBar.test.tsx, src/commons/repl/__tests__/Repl.test.tsx, src/commons/sideContent/__tests__/SideContentAutograder.test.tsx, src/commons/sideContent/__tests__/SideContentContestLeaderboard.test.tsx, src/features/sicp/errors/__tests__/SicpErrors.test.tsx, src/pages/sicp/__tests__/Sicp.test.tsx, src/pages/sicp/subcomponents/__tests__/CodeSnippet.test.tsx, src/pages/sicp/subcomponents/__tests__/SicpLatex.test.tsx
Replaced shallow rendering with React Testing Library's render and asFragment approach; updated tests to await async operations and use proper context providers (Redux Provider, MemoryRouter) instead of mocking hooks.
Drag-and-Drop Library Migration
src/commons/utils/SortableList.tsx
Replaced react-sortable-hoc implementation with @dnd-kit-based approach, introducing DndContext, SortableContext, useSortable hooks, and updating event handling to use DragEndEvent with active/over logic.
Test Utility Updates
src/commons/utils/TestUtils.ts, src/commons/utils/__tests__/TestUtils.test.tsx
Removed shallowRender function; updated renderTree to use React Testing Library's render and return asFragment; modified renderTreeJson to return renderTree output; updated deepFilter signature to accept nullable getChildren return type.
Ref Callback Syntax Updates
src/commons/sideContent/content/SideContentContestVoting.tsx, src/features/sicp/parser/ParseJson.tsx, src/pages/sicp/Sicp.tsx
Converted inline ref callback expressions to block-bodied arrow functions, maintaining functionality while adjusting code style.
Grid Ref Initialization
src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx, src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx, src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
Changed gridApi ref initialization to explicitly set null as initial value and updated export actions to use optional chaining instead of explicit null checks.
Data Visualizer Type Additions
src/features/dataVisualizer/dataVisualizerTypes.ts
Added new type exports: EmptyList, List (recursive structure), Drawing (JSX.Element), and Step (Drawing[]).
Miscellaneous Type Improvements
src/commons/utils/CopyToClipboard.tsx
Applied permissive type assertions (as any) to children props to relax typing constraints.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant UI as React Component
    participant DndKit as DnD Kit (DndContext)
    participant Handler as onSortEnd Handler
    participant State as State Management

    User->>UI: Drag SortableItem
    UI->>DndKit: DragStart Event
    DndKit->>DndKit: Track active/over items
    User->>UI: Drop SortableItem
    UI->>DndKit: DragEnd Event (DragEndEvent)
    DndKit->>Handler: Emit DragEndEvent with active/over
    Handler->>Handler: Calculate oldIndex/newIndex via arrayMove
    Handler->>State: Update items array
    State->>UI: Re-render with new order
    UI->>User: Display reordered list
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Set up more frontend i18n part 1 #3306: Modifies the same sideContent components (SideContentAutograder, SideContentContestVoting, SideContentContestLeaderboard) with overlapping file-level changes related to test infrastructure and component structure.

Poem

🐰 React and types now dance in harmony,
From shallow renders we've set ourselves free,
Drag-and-drop spins with dnd-kit's grace,
Nullable refs find their rightful place,
A modernized warren, efficient and bright!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Upgrade React ecosystem dependencies to v19' clearly and concisely summarizes the main change in the pull request.
Description check ✅ Passed The description addresses the core objectives and includes testing instructions, but the 'Type of change' and comprehensive checklist sections are incomplete or unfilled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch react-19
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
src/commons/achievement/control/AchievementEditor.tsx (2)

31-37: ⚠️ Potential issue | 🔴 Critical

Bounds check order causes potential crash when UUID not found.

If uuid doesn't exist in editableCards, the loop increments idx until idx === editableCards.length. On the next condition evaluation, editableCards[idx].key accesses an undefined element before the bounds check, causing a runtime error.

🐛 Proposed fix: swap condition order
 const removeCard = (uuid: string) => {
   let idx = 0;
-  while (editableCards[idx].key !== uuid && idx < editableCards.length) {
+  while (idx < editableCards.length && editableCards[idx].key !== uuid) {
     idx++;
   }
+  if (idx >= editableCards.length) {
+    return; // UUID not found
+  }
   editableCards.splice(idx, 1);
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/achievement/control/AchievementEditor.tsx` around lines 31 - 37,
The removeCard function can access editableCards[idx] out of bounds if the uuid
isn't found; update removeCard to check the index bound before accessing element
(i.e., test idx < editableCards.length first in the while condition) or replace
the loop with a safe lookup such as Array.prototype.findIndex to get the target
index and only splice if index !== -1; reference the removeCard function and the
editableCards array when making the change.

7-7: ⚠️ Potential issue | 🟠 Major

Module-level mutable state will cause stale data across mounts.

editableCards persists outside the component lifecycle. If AchievementEditor unmounts and remounts (e.g., navigation), the array retains stale entries from the previous mount instead of reinitializing from the inferencer. This also breaks React Strict Mode's double-render checks.

Consider moving this into component state with useState or useRef.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/achievement/control/AchievementEditor.tsx` at line 7, The
module-level mutable array editableCards causes stale cross-mount state in the
AchievementEditor component; move editableCards into the component lifecycle
(e.g., replace the top-level let editableCards with a useState or useRef inside
the AchievementEditor function) and initialize it from the inferencer there,
update all places that push/pop or read editableCards to use the state/ref (and
corresponding setters) so the array is recreated on each mount and React Strict
Mode double-renders behave correctly.
src/commons/dropdown/__tests__/Dropdown.test.tsx (1)

40-50: ⚠️ Potential issue | 🟠 Major

Restore the assertions these tests are named after.

Both cases now stop at a snapshot and leave the auth-specific check as TODO, so they no longer prove the logged-in/logged-out mounting behavior they describe. src/commons/dropdown/Dropdown.tsx:42-91 still gates Profile, DropdownCourses, and DropdownCreateCourse on isLoggedIn, and a regression there would now slip through without a targeted assertion.

If helpful, I can sketch an RTL-friendly assertion pattern for these logged-in and logged-out cases.

Also applies to: 52-63

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/dropdown/__tests__/Dropdown.test.tsx` around lines 40 - 50, The
test currently only snapshots the rendered tree but doesn't assert the
auth-specific behavior; update the test "Dropdown does not mount Profile,
DropdownCourses and DropdownCreateCourses components when a user is not logged
in" (and the similar test at 52-63) to explicitly assert that Profile,
DropdownCourses and DropdownCreateCourse are NOT mounted by checking the
rendered output from renderTreeJson(getElement(mockStore)) does not contain
those component nodes/identifiers (e.g., verify absence of "Profile",
"DropdownCourses", "DropdownCreateCourse" in the tree or use the same query
helpers you use elsewhere), using the same mockStore and
getElement/renderTreeJson setup so the snapshot plus negative assertions prove
the logged-out behavior.
🧹 Nitpick comments (6)
src/commons/utils/CopyToClipboard.tsx (1)

25-33: Type safety bypassed with as any casts.

The as any casts on lines 25 and 33 work around React 19's stricter cloneElement typing. While functional, this completely bypasses type checking for the children's props.

This is acceptable as a pragmatic workaround given the component's purpose (wrapping arbitrary children to inject onClick), but consider documenting why the casts are necessary, e.g., via a brief comment.

💡 Suggested documentation
     // Get original onClick handler if any
+    // Note: Using 'as any' because React 19's stricter cloneElement typing
+    // doesn't easily support injecting props into arbitrary ReactElement children.
     const originalOnClick = (children?.props as any)?.onClick;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/utils/CopyToClipboard.tsx` around lines 25 - 33, The casts to `as
any` in CopyToClipboard.tsx (used when accessing (children?.props as
any)?.onClick and when passing children into cloneElement) bypass React 19
typings; add a concise comment above the casted usages explaining that these
casts are intentional to support wrapping arbitrary children and injecting an
onClick handler while React's stricter cloneElement types prevent a safer
generic; reference the relevant symbols in the comment (originalOnClick,
handleClick, cloneElement, children) and mention this is a pragmatic, documented
workaround rather than removing the casts.
src/commons/navigationBar/__tests__/NavigationBar.test.tsx (1)

36-57: Consider adding missing session fields for more complete test coverage.

The mock store provides role, name, courseId, courseShortName, and assessmentConfigurations, but NavigationBar also uses enableAchievements, enableSourcecast, enableStories, enableOverallLeaderboard, and enableContestLeaderboard from the session. While these will default to falsy values (disabling those nav items), explicitly setting them would make the test data more complete and the test's intent clearer.

💡 Suggested enhancement
     const store = mockInitialStore({
       session: {
         role: Role.Student,
         name: 'Bob',
         courseId: 1,
         courseShortName: 'CS1101S',
+        enableAchievements: true,
+        enableSourcecast: true,
         assessmentConfigurations: [
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/navigationBar/__tests__/NavigationBar.test.tsx` around lines 36 -
57, The test's mock store created via mockInitialStore is missing explicit
session feature flags used by NavigationBar (enableAchievements,
enableSourcecast, enableStories, enableOverallLeaderboard,
enableContestLeaderboard); update the session object passed into
mockInitialStore to include those boolean fields (true or false as appropriate
for the test scenario) so the NavigationBar test covers the presence/absence of
those nav items and makes intent explicit.
src/commons/utils/TestUtils.ts (2)

4-8: Questionable act() usage — consider simplifying.

Line 6 await act(() => app) doesn't perform any state updates; it simply returns the render result from the callback. The act() wrapper is designed for code that triggers React state changes, not for wrapping already-returned values.

If the intent is to wait for effects to settle, consider:

♻️ Suggested fix
 export const renderTree = async (element: React.ReactElement) => {
-  const app = render(element);
-  await act(() => app);
-  return app.asFragment();
+  let app: ReturnType<typeof render>;
+  await act(async () => {
+    app = render(element);
+  });
+  return app!.asFragment();
 };

Or if synchronous rendering is sufficient:

-export const renderTree = async (element: React.ReactElement) => {
-  const app = render(element);
-  await act(() => app);
-  return app.asFragment();
-};
+export const renderTree = (element: React.ReactElement) => {
+  const { asFragment } = render(element);
+  return asFragment();
+};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/utils/TestUtils.ts` around lines 4 - 8, The current renderTree
helper incorrectly wraps the already-returned render() result in await act(() =>
app); remove the act wrapper and either return render(element).asFragment()
directly (for synchronous renders) or, if you need to wait for effects, await a
proper async helper such as waitFor(() => {/* assertion */}) or await act(async
() => {/* trigger async updates */}); update the renderTree function
(referencing renderTree, render, act, and asFragment) to use one of these
approaches so act is only used around actual state-updating code or awaitable
effects.

10-14: Follow up on the TODO to remove renderTreeJson.

The function now just returns renderTree(element) directly, making it redundant. Consider tracking this cleanup task.

Would you like me to open an issue to track the removal of renderTreeJson and update all call sites to use renderTree directly?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/utils/TestUtils.ts` around lines 10 - 14, The exported helper
renderTreeJson in TestUtils.ts is redundant because it simply awaits and returns
renderTree(element); remove the renderTreeJson function and replace all its call
sites to call renderTree(...) directly (update imports if they reference
renderTreeJson and ensure tests import renderTree from the same module);
optionally open a small cleanup PR or issue to track removing renderTreeJson and
verifying tests pass after updating call sites.
src/commons/assessmentWorkspace/__tests__/AssessmentWorkspace.test.tsx (1)

99-103: Same act() concern as in TestUtils.ts.

The await act(() => app) pattern here has the same issue — app is already the render result, so wrapping it in act() doesn't trigger any state updates. Consider the same fix suggested for TestUtils.ts.

♻️ Suggested fix
 const renderElement = async (props: AssessmentWorkspaceProps) => {
-  const app = render(createMemoryRouterWithRoutes(props));
-  await act(() => app);
-  return app;
+  let app: ReturnType<typeof render>;
+  await act(async () => {
+    app = render(createMemoryRouterWithRoutes(props));
+  });
+  return app!;
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/assessmentWorkspace/__tests__/AssessmentWorkspace.test.tsx`
around lines 99 - 103, The test's renderElement function misuses act by awaiting
act(() => app) where app is the already-completed render result; remove the
erroneous await act call and simply return the rendered result from
renderElement (i.e., keep the render(createMemoryRouterWithRoutes(props)) call
and delete the await act(() => app) line) so that renderElement returns the
proper render result from render/createMemoryRouterWithRoutes without wrapping a
no-op in act.
src/commons/repl/__tests__/Repl.test.tsx (1)

37-37: Remove unnecessary async declarations from snapshot tests.

These eight snapshot tests declare async but don't use await, making the keyword unnecessary noise:

  • Line 37: 'Repl renders correctly'
  • Line 55: 'Code output renders correctly'
  • Line 60: 'Running output renders correctly'
  • Line 65: 'Result output (no consoleLogs) renders correctly'
  • Line 70: 'Result output (with consoleLogs) renders correctly'
  • Line 79: 'Error output (no consoleLogs) renders correctly'
  • Line 84: 'Error output (with consoleLogs) renders correctly'
  • Line 93: 'Empty output renders an empty card'
✂️ Suggested diff
-test('Repl renders correctly', async () => {
+test('Repl renders correctly', () => {
@@
-test('Code output renders correctly', async () => {
+test('Code output renders correctly', () => {
@@
-test('Running output renders correctly', async () => {
+test('Running output renders correctly', () => {
@@
-test('Result output (no consoleLogs) renders correctly', async () => {
+test('Result output (no consoleLogs) renders correctly', () => {
@@
-test('Result output (with consoleLogs) renders correctly', async () => {
+test('Result output (with consoleLogs) renders correctly', () => {
@@
-test('Error output (no consoleLogs) renders correctly', async () => {
+test('Error output (no consoleLogs) renders correctly', () => {
@@
-test('Error output (with consoleLogs) renders correctly', async () => {
+test('Error output (with consoleLogs) renders correctly', () => {
@@
-test('Empty output renders an empty card', async () => {
+test('Empty output renders an empty card', () => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commons/repl/__tests__/Repl.test.tsx` at line 37, The listed snapshot
tests declare the async keyword but never use await; remove the unnecessary
async from each test declaration (e.g., the test blocks named 'Repl renders
correctly', 'Code output renders correctly', 'Running output renders correctly',
'Result output (no consoleLogs) renders correctly', 'Result output (with
consoleLogs) renders correctly', 'Error output (no consoleLogs) renders
correctly', 'Error output (with consoleLogs) renders correctly', and 'Empty
output renders an empty card') by changing their signatures to plain synchronous
test callbacks and confirming there are no await usages inside those functions
(update the test() declarations for those names accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 39-40: Add `@dnd-kit/utilities` as a direct dependency in
package.json so the import of CSS in src/commons/utils/SortableList.tsx (the
line importing CSS from "@dnd-kit/utilities") resolves without relying on
transitive hoisting; update package.json dependencies to include
"@dnd-kit/utilities" (choose a version compatible with the installed
"@dnd-kit/core" and "@dnd-kit/sortable", e.g., align major version) and run your
package manager install to update lockfiles.

In `@src/commons/sideContent/SideContentTypes.ts`:
- Line 2: The code uses React.MouseEvent<HTMLElement> (e.g.,
React.MouseEvent<HTMLElement>) but the file only imports JSX as a type; add a
type-only import for React to bring the React namespace into scope by adding
"import type React from 'react';" (so references to
React.MouseEvent<HTMLElement> resolve) or alternatively replace usages of
React.MouseEvent with an imported MouseEvent type via "import type { MouseEvent
} from 'react';" and update occurrences (e.g., change
React.MouseEvent<HTMLElement> to MouseEvent<HTMLElement>).

In `@src/commons/utils/SortableList.tsx`:
- Around line 21-23: The code currently uses the item label string as the
dnd-kit id and then calls indexOf(label) to compute reorder indices, which
breaks for duplicate labels and can return -1; change the items to carry a
stable unique id (e.g. add an "id: string" field to the SortableItemProps and
use that id for the draggable id), use findIndex(item => item.id === activeId)
or map to ids to compute from/to indices instead of indexOf(label), and guard
before calling arrayMove (ensure both from and to are >= 0 and different);
update any references in the SortableList/SortableItem components and the
onSortEnd handler to use the new item.id rather than the label.

In `@src/features/sicp/errors/__tests__/SicpErrors.test.tsx`:
- Around line 19-23: Rename the test's description to correctly reflect it's
testing the parsing error: update the test labeled 'unexpected error renders
correctly' to something like 'parsing error renders correctly' in the test that
calls getSicpError(SicpErrorType.PARSING_ERROR) and asserts renderTree(element)
and screen.getByTestId('sicp-parsing-error'); ensure the test name change is
applied where the test function and its description string are defined.

---

Outside diff comments:
In `@src/commons/achievement/control/AchievementEditor.tsx`:
- Around line 31-37: The removeCard function can access editableCards[idx] out
of bounds if the uuid isn't found; update removeCard to check the index bound
before accessing element (i.e., test idx < editableCards.length first in the
while condition) or replace the loop with a safe lookup such as
Array.prototype.findIndex to get the target index and only splice if index !==
-1; reference the removeCard function and the editableCards array when making
the change.
- Line 7: The module-level mutable array editableCards causes stale cross-mount
state in the AchievementEditor component; move editableCards into the component
lifecycle (e.g., replace the top-level let editableCards with a useState or
useRef inside the AchievementEditor function) and initialize it from the
inferencer there, update all places that push/pop or read editableCards to use
the state/ref (and corresponding setters) so the array is recreated on each
mount and React Strict Mode double-renders behave correctly.

In `@src/commons/dropdown/__tests__/Dropdown.test.tsx`:
- Around line 40-50: The test currently only snapshots the rendered tree but
doesn't assert the auth-specific behavior; update the test "Dropdown does not
mount Profile, DropdownCourses and DropdownCreateCourses components when a user
is not logged in" (and the similar test at 52-63) to explicitly assert that
Profile, DropdownCourses and DropdownCreateCourse are NOT mounted by checking
the rendered output from renderTreeJson(getElement(mockStore)) does not contain
those component nodes/identifiers (e.g., verify absence of "Profile",
"DropdownCourses", "DropdownCreateCourse" in the tree or use the same query
helpers you use elsewhere), using the same mockStore and
getElement/renderTreeJson setup so the snapshot plus negative assertions prove
the logged-out behavior.

---

Nitpick comments:
In `@src/commons/assessmentWorkspace/__tests__/AssessmentWorkspace.test.tsx`:
- Around line 99-103: The test's renderElement function misuses act by awaiting
act(() => app) where app is the already-completed render result; remove the
erroneous await act call and simply return the rendered result from
renderElement (i.e., keep the render(createMemoryRouterWithRoutes(props)) call
and delete the await act(() => app) line) so that renderElement returns the
proper render result from render/createMemoryRouterWithRoutes without wrapping a
no-op in act.

In `@src/commons/navigationBar/__tests__/NavigationBar.test.tsx`:
- Around line 36-57: The test's mock store created via mockInitialStore is
missing explicit session feature flags used by NavigationBar
(enableAchievements, enableSourcecast, enableStories, enableOverallLeaderboard,
enableContestLeaderboard); update the session object passed into
mockInitialStore to include those boolean fields (true or false as appropriate
for the test scenario) so the NavigationBar test covers the presence/absence of
those nav items and makes intent explicit.

In `@src/commons/repl/__tests__/Repl.test.tsx`:
- Line 37: The listed snapshot tests declare the async keyword but never use
await; remove the unnecessary async from each test declaration (e.g., the test
blocks named 'Repl renders correctly', 'Code output renders correctly', 'Running
output renders correctly', 'Result output (no consoleLogs) renders correctly',
'Result output (with consoleLogs) renders correctly', 'Error output (no
consoleLogs) renders correctly', 'Error output (with consoleLogs) renders
correctly', and 'Empty output renders an empty card') by changing their
signatures to plain synchronous test callbacks and confirming there are no await
usages inside those functions (update the test() declarations for those names
accordingly).

In `@src/commons/utils/CopyToClipboard.tsx`:
- Around line 25-33: The casts to `as any` in CopyToClipboard.tsx (used when
accessing (children?.props as any)?.onClick and when passing children into
cloneElement) bypass React 19 typings; add a concise comment above the casted
usages explaining that these casts are intentional to support wrapping arbitrary
children and injecting an onClick handler while React's stricter cloneElement
types prevent a safer generic; reference the relevant symbols in the comment
(originalOnClick, handleClick, cloneElement, children) and mention this is a
pragmatic, documented workaround rather than removing the casts.

In `@src/commons/utils/TestUtils.ts`:
- Around line 4-8: The current renderTree helper incorrectly wraps the
already-returned render() result in await act(() => app); remove the act wrapper
and either return render(element).asFragment() directly (for synchronous
renders) or, if you need to wait for effects, await a proper async helper such
as waitFor(() => {/* assertion */}) or await act(async () => {/* trigger async
updates */}); update the renderTree function (referencing renderTree, render,
act, and asFragment) to use one of these approaches so act is only used around
actual state-updating code or awaitable effects.
- Around line 10-14: The exported helper renderTreeJson in TestUtils.ts is
redundant because it simply awaits and returns renderTree(element); remove the
renderTreeJson function and replace all its call sites to call renderTree(...)
directly (update imports if they reference renderTreeJson and ensure tests
import renderTree from the same module); optionally open a small cleanup PR or
issue to track removing renderTreeJson and verifying tests pass after updating
call sites.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1530b397-7cf1-41f2-96ed-582ff65e7733

📥 Commits

Reviewing files that changed from the base of the PR and between c928c31 and 144f35d.

⛔ Files ignored due to path filters (29)
  • src/commons/__tests__/__snapshots__/ContentDisplay.test.tsx.snap is excluded by !**/*.snap
  • src/commons/__tests__/__snapshots__/Markdown.test.tsx.snap is excluded by !**/*.snap
  • src/commons/application/__tests__/__snapshots__/Application.test.tsx.snap is excluded by !**/*.snap
  • src/commons/assessment/__tests__/__snapshots__/Assessment.test.tsx.snap is excluded by !**/*.snap
  • src/commons/assessmentWorkspace/__tests__/__snapshots__/AssessmentWorkspace.test.tsx.snap is excluded by !**/*.snap
  • src/commons/dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap is excluded by !**/*.snap
  • src/commons/editor/__tests__/__snapshots__/Editor.test.tsx.snap is excluded by !**/*.snap
  • src/commons/navigationBar/__tests__/__snapshots__/NavigationBar.test.tsx.snap is excluded by !**/*.snap
  • src/commons/navigationBar/subcomponents/__tests__/__snapshots__/AcademyNavigationBar.test.tsx.snap is excluded by !**/*.snap
  • src/commons/navigationBar/subcomponents/__tests__/__snapshots__/NavigationBarLangSelectButton.test.tsx.snap is excluded by !**/*.snap
  • src/commons/navigationBar/subcomponents/__tests__/__snapshots__/SicpNavigationBar.test.tsx.snap is excluded by !**/*.snap
  • src/commons/repl/__tests__/__snapshots__/Repl.test.tsx.snap is excluded by !**/*.snap
  • src/commons/sideContent/__tests__/__snapshots__/SideContentAutograder.test.tsx.snap is excluded by !**/*.snap
  • src/commons/sideContent/__tests__/__snapshots__/SideContentContestLeaderboard.test.tsx.snap is excluded by !**/*.snap
  • src/commons/sideContent/__tests__/__snapshots__/SideContentContestVoting.test.tsx.snap is excluded by !**/*.snap
  • src/commons/sideContent/__tests__/__snapshots__/SideContentCseMachine.test.tsx.snap is excluded by !**/*.snap
  • src/commons/sideContent/__tests__/__snapshots__/SideContentHtmlDisplay.test.tsx.snap is excluded by !**/*.snap
  • src/features/cseMachine/__tests__/__snapshots__/CseMachine.test.tsx.snap is excluded by !**/*.snap
  • src/features/cseMachine/__tests__/__snapshots__/CseMachineAnimation.test.tsx.snap is excluded by !**/*.snap
  • src/features/sicp/errors/__tests__/__snapshots__/SicpErrors.test.tsx.snap is excluded by !**/*.snap
  • src/features/sicp/parser/__tests__/__snapshots__/ParseJson.test.tsx.snap is excluded by !**/*.snap
  • src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap is excluded by !**/*.snap
  • src/pages/sicp/__tests__/__snapshots__/Sicp.test.tsx.snap is excluded by !**/*.snap
  • src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.test.tsx.snap is excluded by !**/*.snap
  • src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpExercise.test.tsx.snap is excluded by !**/*.snap
  • src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.test.tsx.snap is excluded by !**/*.snap
  • src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpLatex.test.tsx.snap is excluded by !**/*.snap
  • src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpToc.test.tsx.snap is excluded by !**/*.snap
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (69)
  • package.json
  • src/commons/ContentDisplay.tsx
  • src/commons/achievement/control/AchievementEditor.tsx
  • src/commons/achievement/control/GoalEditor.tsx
  • src/commons/application/__tests__/Application.test.tsx
  • src/commons/assessment/Assessment.tsx
  • src/commons/assessment/__tests__/Assessment.test.tsx
  • src/commons/assessmentWorkspace/__tests__/AssessmentWorkspace.test.tsx
  • src/commons/controlBar/ControlBar.tsx
  • src/commons/controlBar/ControlBarShareButton.tsx
  • src/commons/delay/Delay.tsx
  • src/commons/dropdown/DropdownCourses.tsx
  • src/commons/dropdown/DropdownCreateCourse.tsx
  • src/commons/dropdown/__tests__/Dropdown.test.tsx
  • src/commons/editor/__tests__/Editor.test.tsx
  • src/commons/fileSystemView/FileSystemViewContextMenu.tsx
  • src/commons/mobileWorkspace/mobileSideContent/MobileSideContent.tsx
  • src/commons/navigationBar/__tests__/NavigationBar.test.tsx
  • src/commons/navigationBar/subcomponents/__tests__/AcademyNavigationBar.test.tsx
  • src/commons/navigationBar/subcomponents/__tests__/SicpNavigationBar.test.tsx
  • src/commons/profile/Profile.tsx
  • src/commons/repl/Repl.tsx
  • src/commons/repl/ReplInput.tsx
  • src/commons/repl/__tests__/Repl.test.tsx
  • src/commons/sideBar/SideBar.tsx
  • src/commons/sideContent/SideContent.tsx
  • src/commons/sideContent/SideContentProvider.tsx
  • src/commons/sideContent/SideContentTypes.ts
  • src/commons/sideContent/__tests__/SideContentAutograder.test.tsx
  • src/commons/sideContent/__tests__/SideContentContestLeaderboard.test.tsx
  • src/commons/sideContent/content/SideContentContestVoting.tsx
  • src/commons/sideContent/content/githubAssessments/SideContentMarkdownEditor.tsx
  • src/commons/sourceRecorder/SourceRecorderControlBar.tsx
  • src/commons/sourceRecorder/SourceRecorderEditor.tsx
  • src/commons/utils/CopyToClipboard.tsx
  • src/commons/utils/Hooks.ts
  • src/commons/utils/SortableList.tsx
  • src/commons/utils/TestUtils.ts
  • src/commons/utils/__tests__/TestUtils.test.tsx
  • src/commons/utils/notifications/NotificationsHelper.ts
  • src/features/cseMachine/CseMachineLayout.tsx
  • src/features/cseMachine/components/Text.tsx
  • src/features/cseMachine/components/arrows/GenericArrow.tsx
  • src/features/cseMachine/components/values/ContValue.tsx
  • src/features/cseMachine/components/values/FnValue.tsx
  • src/features/cseMachine/components/values/GlobalFnValue.tsx
  • src/features/dataVisualizer/dataVisualizer.tsx
  • src/features/dataVisualizer/dataVisualizerTypes.ts
  • src/features/dataVisualizer/tree/ArrayTreeNode.tsx
  • src/features/dataVisualizer/tree/DrawableTreeNode.tsx
  • src/features/dataVisualizer/tree/FunctionTreeNode.tsx
  • src/features/dataVisualizer/tree/Tree.tsx
  • src/features/sicp/errors/SicpErrors.tsx
  • src/features/sicp/errors/__tests__/SicpErrors.test.tsx
  • src/features/sicp/parser/ParseJson.tsx
  • src/pages/academy/adminPanel/subcomponents/AddStoriesUserPanel.tsx
  • src/pages/academy/adminPanel/subcomponents/AddUserPanel.tsx
  • src/pages/academy/adminPanel/subcomponents/assessmentConfigPanel/AssessmentConfigPanel.tsx
  • src/pages/academy/adminPanel/subcomponents/storiesUserConfigPanel/StoriesUserConfigPanel.tsx
  • src/pages/academy/adminPanel/subcomponents/userConfigPanel/UserConfigPanel.tsx
  • src/pages/academy/gameSimulator/subcomponents/assetViewer/AssetViewer.tsx
  • src/pages/academy/gameSimulator/subcomponents/assetViewer/AssetViewerUtils.tsx
  • src/pages/githubCallback/__tests__/GitHubCallback.test.tsx
  • src/pages/sicp/Sicp.tsx
  • src/pages/sicp/__tests__/Sicp.test.tsx
  • src/pages/sicp/subcomponents/SicpExercise.tsx
  • src/pages/sicp/subcomponents/__tests__/CodeSnippet.test.tsx
  • src/pages/sicp/subcomponents/__tests__/SicpLatex.test.tsx
  • src/pages/sicp/subcomponents/chatbot/ChatBox.tsx

Comment thread package.json
Comment thread src/commons/sideContent/SideContentTypes.ts
Comment thread src/commons/utils/SortableList.tsx
Comment thread src/features/sicp/errors/__tests__/SicpErrors.test.tsx
@RichDom2185 RichDom2185 merged commit 0095e10 into master Mar 16, 2026
10 checks passed
@RichDom2185 RichDom2185 deleted the react-19 branch March 16, 2026 13:12
Oofky added a commit to Akshay-2007-1/CSE_liveness_frontend that referenced this pull request Mar 17, 2026
commit 2979582
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Mar 17 00:23:22 2026 +0000

    chore(deps): update blueprintjs to v6.10.0 (source-academy#3673)

    * chore(deps): update blueprintjs to v6.10.0

    * Update test snapshots

    ---------

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>

commit 9aef777
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Tue Mar 17 01:00:27 2026 +0800

    Upgrade jsdom to v29 (source-academy#3672)

    * Upgrade jsdom to v29

    * Update some snapshots

    * Fix tests

    * Increase test timeout

commit 0ab537b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 16:06:50 2026 +0000

    chore(deps): update dependency eslint-plugin-react-hooks to v7 (source-academy#3484)

    * chore(deps): update dependency eslint-plugin-react-hooks to v7

    * Fix breaking changes

    ---------

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>

commit 5184d62
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 23:54:40 2026 +0800

    Fix concurrent precache logic (source-academy#3671)

    * Create own copy of precaching-striping

    * Remove old version

    * Update SW

    * Fix `this` binding

commit 2d06530
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 23:23:42 2026 +0800

    Upgrade Vite/Vitest ecosystem dependencies to v8 (source-academy#3670)

    * Use modern `paths` format for tsconfig

    * Fix type imports

    * Upgrade Vite ecosystem to v8

    * Fix missing await

commit 4de3cfa
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 23:19:34 2026 +0800

    Concurrently precache assets (source-academy#3669)

    * Add precache-striping

    * Clean up rsbuild config

    * Remove now-unneeded Node polyfills

    * Fetch assets concurrently

commit 01b028f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 22:50:53 2026 +0800

    chore(deps): update dependency i18next to v25.8.18 (source-academy#3668)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 7e34573
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 22:45:11 2026 +0800

    Group Renovate BlueprintJS updates (source-academy#3666)

    * Set up Renovate dep groups

    * Undo dev-deps groupign

commit 07e9128
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Mon Mar 16 22:34:18 2026 +0800

    CSE Machine : Fix nano bugs (source-academy#3667)

    * Fix nano bugs

    * Fix unnormalized line endings

    ---------

    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>

commit 5767324
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 13:21:04 2026 +0000

    chore(deps): update dependency react-i18next to v16.5.7 (source-academy#3664)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit c228254
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 13:16:28 2026 +0000

    chore(deps): update dependency @rsbuild/plugin-svgr to v1.3.1 (source-academy#3663)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 0095e10
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 21:12:49 2026 +0800

    Upgrade React ecosystem dependencies to v19 (source-academy#3247)

    * Upgrade React ecosystem dependencies to v19

    * Fix some breaking changes

    * Fix more breaking changes

    * Fix remaining codebase errors

    * Fix some test errors

    * Update AcademyNavigationBar.tsx

    * Fix remaining test error

    * Fix missed type bug

    * Remove deprecated react-test-renderer

    * Delete useless test

    * Update some snapshots

    * Update more snapshots

    * Fix some tests and snapshots

    * Update more snapshots

    * Update Repl tests

    * Update editor tests

    * Update lockfile post-merge

    * Fix JSX namespace errors

    * Update dependencies post-merge

    * Deduplicate dependencies

    * Update snapshots post-merge

    * Update lockfile post-merge

    * Update snapshots

    * Fix breaking type changes

    * Remove shallow render

    * Remove shallow render from tests

    * Remove unused import

    * Fix more tests

    * Clean up snapshots

    * Fix tests double render

    * Update snapshots

    * Replace react-sortable-hoc with dnd-kit

    * Update dep constraints

    * Install `@dnd-kit/core`

    * Migrate sortable list to dnd-kit

    * Fix tests rendering

    * Add TODOs

    * Address phantom dependency

commit c928c31
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:54:21 2026 +0000

    chore(deps): update dependency sass to v1.98.0 (source-academy#3657)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 307a8d1
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:50:20 2026 +0000

    chore(deps): update dependency @rsbuild/plugin-sass to v1.5.1 (source-academy#3661)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit b132f3b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:46:40 2026 +0000

    chore(deps): update dependency @rsbuild/plugin-react to v1.4.6 (source-academy#3660)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 9db226b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:42:57 2026 +0000

    chore(deps): update dependency dompurify to v3.3.3 (source-academy#3658)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 298b27f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 18:37:22 2026 +0800

    chore(deps): update dependency @sentry/react to v10.43.0 (source-academy#3656)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 7f33412
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Mar 15 12:27:50 2026 +0000

    chore(deps): update dependency typescript-eslint to v8.57.0 (source-academy#3654)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 20933ef
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Mar 15 12:23:36 2026 +0000

    chore(deps): update dependency react-simple-keyboard to v3.8.172 (source-academy#3655)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 93ec2a6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Mar 15 12:19:41 2026 +0000

    chore(deps): update dependency eslint to v9.39.4 (source-academy#3649)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 0024c6a
Author: Roger Zhang <rogerteo200@gmail.com>
Date:   Sun Mar 15 20:16:24 2026 +0800

    QOL: Arrows bending too early or too late (source-academy#3653)

    * feat: colour-coding arrows

    * feat: removed colour-coding for arrows (all white), implemented feature where clicked arrows remain highlighted

    * fix: removed whitespace

    * fix: bugfix and linting

    * test2

    * fix: Refactor arrow selection management and clean up code style

    * fix: ran linter

    * fix: snapshots

    * fix: change to american english for the word "color"

    * fix: faded arrows now stay faded

    * test

    * test

    * fix: prematurely terminating arrows

    * added global MinTerminalSegmentLength

commit 4b9af0d
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Fri Mar 13 17:56:39 2026 +0800

    CSE Machine : Fixes Cache and Arrow displacement errors (source-academy#3650)

    * Fixed arrow change!

    * Fixed the cache difference issue

    * Fixed tsc error - II

commit ff7ab4f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed Mar 11 14:23:57 2026 +0800

    chore(deps): update dependency react-i18next to v16.5.5 (source-academy#3648)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit b822ca5
Author: Ho Ke Ying <168710875+Oofky@users.noreply.github.com>
Date:   Wed Mar 11 01:09:26 2026 +0800

    Changed hotkey for hulk mode (source-academy#3647)

    Changed from alt+shift+h to ctrl+alt+h

commit 90066a6
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Tue Mar 10 20:54:53 2026 +0800

    Hulk fix (source-academy#3600)

    * Hulk Fix!
    Initial commit

    * Changed the faded colours to fit

    Fits the green screen background better for a faded effect

    * Fixed the formatting!

    * Revert foreground colors

    For its intended use on dark backgrounds after chroma keying

    * Fixed formatting

    ---------

    Co-authored-by: Oofky <beensprouting@gmail.com>

commit 797aecd
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Tue Mar 10 14:31:17 2026 +0800

    CSE Machine : Function Descriptions modification for Frame overlap (source-academy#3627)

    * Added the removeDeadFrames feature
    Only dead frames disappear as of right now, for function objects and the rest, work to be done

    Animations : will be done by Keying!

    * Added the functionality for toggle of dead vs ONLY live for
    	function closure objects
    	Generic Arrow
    	Text (recursively automated)
    	Arrays and hence pairs as well

    * Fix : Removed gaps
    Finally processed the logic by recomputing the envTree for the specific step when the toggle is on

    * Fix : CI format errors and made it from checkbox -> onClick button!

    * Fix : Toggle -> One time cleanup

    * Changed from Hide -> Clear and the icon

    * Fixed the following errors and implemented suggestions
    1. Fixed the snapshot and lint erros
    2. Added the disable feature (as suggested by @sayomaki) where to suggest that its CLEAR and not HIDE, we disable after pressing once!!
    3. Changed all instances of hide to clear in our current implementation!

    * Fixed tsc error

    * Fixed the sentry bot suggestion

    * Fixed the error where the frames WERE not moving due to the Layout team's invariant!
    Now the frames do move by violating their invariant ONLY if the Clear mode is ON

    * Version 1

    * Version 2

    * Added the following functionalities
    1. Capped out the func desc box's widths
    2. Click to reveal FULL length descriptions in normal mode
    3. Fixed gaps between the FRAMES in PRINTABLE mode

    * Fixed a bug where the gap between two frames was not dynamically being set and was capped out!
    1. This makes every other test case which we have made look MUCH better!
    2. Secondly, we also fixed a bug where recursive closure objects' description boxes' width and length was NOT being
    	accounted for

    * Fixed format error

    * cse layout: normalize frame width accounting and add printable fn description spacing

    - normalize Frame width semantics:
      - totalWidth now represents only frame block width
      - totalDataWidth is computed as true overflow beyond frame right edge
      - remove pre-estimation path that double-counted spacing in some cases
    - update Level width derivation to include last frame totalDataWidth
    - improve printable mode readability for function descriptions:
      - add small vertical offset above printable fn description labels
      - add tiny bottom gap below printable fn description boxes
      - propagate new spacing to Binding and ArrayValue height calculations

    This reduces excessive horizontal gaps and mitigates small printable-mode overlaps between fn description boxes
    and nearby array/binding content.
    Also removed the excess frame offset width given for safety that was NOT dynamic!
    So now, the frame width gapping is dynamic!

    * Fixed format errors

    * Fixed sentry's bot error

    * Fixed source-academy#3639 by adding closing parantheses

    * Fix stationary x-coordinates for normal and printable modes:

    - Populates both Normal and Printable caches upfront in drawCse.
    - Removes redundant cache generation logic from redraw.
    - Prevents premature cache clearing in clearCse to maintain stability.

    * removed comments and console logs

    * Fixed format errors

    ---------

    Co-authored-by: Martin Henz <henz@comp.nus.edu.sg>
    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
    Co-authored-by: gigopogy <ethanlockzy@gmail.com>

commit 3e7e0df
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Mar 10 11:55:38 2026 +0800

    chore(deps): update dependency react-simple-keyboard to v3.8.168 (source-academy#3644)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit e678e7e
Author: Ho Ke Ying <168710875+Oofky@users.noreply.github.com>
Date:   Tue Mar 10 06:30:00 2026 +0800

    Fixed liveness bug for null array units  (source-academy#3642)

    * Fixed null array units liveness

    Fixed the issue where null array units sometimes still have the default stroke color, despite being dead

    * Fixed format errors

    ---------

    Co-authored-by: Martin Henz <henz@comp.nus.edu.sg>

commit d331a5d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:28:37 2026 +0000

    chore(deps): update dependency @swc/core to v1.15.18 (source-academy#3636)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit fbf7e64
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:23:15 2026 +0000

    chore(deps): update dependency i18next to v25.8.14 (source-academy#3640)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit e0649aa
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:14:09 2026 +0000

    chore(deps): update dependency dompurify to v3.3.2 [security] (source-academy#3635)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 2563a62
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:05:44 2026 +0000

    chore(deps): update dependency @sentry/react to v10.41.0 (source-academy#3638)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 094601a
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Tue Mar 10 04:00:38 2026 +0800

    Fix lockfile and other incorrect changes (source-academy#3643)

    * Revert some lockfile changes from 1088

    * Bump Yarn to 4.13.0

    * Fix snapshots

commit 49dadc8
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Thu Mar 5 23:39:45 2026 +0800

    CSE Machine : Fixed the NavBar  (source-academy#3630)

    * Fixed the errors

    * Fixed format errors

    * Fixed inequality overlook
RichDom2185 pushed a commit that referenced this pull request Apr 6, 2026
* Added the removeDeadFrames feature
Only dead frames disappear as of right now, for function objects and the rest, work to be done

Animations : will be done by Keying!

* Added the functionality for toggle of dead vs ONLY live for
	function closure objects
	Generic Arrow
	Text (recursively automated)
	Arrays and hence pairs as well

* Fix : Removed gaps
Finally processed the logic by recomputing the envTree for the specific step when the toggle is on

* Fix : CI format errors and made it from checkbox -> onClick button!

* Fix : Toggle -> One time cleanup

* Changed from Hide -> Clear and the icon

* WIP logic for Clear Dead Frames animation

Currently, the animations do not play.

Putting these changes into a branch because I want to save these changes so that I can fully rewrite playClearDeadFramesAnim() while having a backup in case my new idea does not work.

* Frames have a shifting animation now

After clicking Clear Dead Frames, frames that get shifted (to close gaps) now have an animation moving from their old position to their new position.

To do:
- animate other objects, not just frames
- possibly cover up the "new frames" before the animation finishes

* "New frames" are covered up

Now you cannot see the new frames before the frame shifting animation finishes.

Test code (for my own easy access):
function foo() {
    function f(x) {
        return y => x + 3;
    }
    return f;
}
foo()(4);
foo()(5);

To do:
- Make frame text (from bindings) move with the frame. This should be implemented with AnimatedTextComponent rather than AnimatedTextbox because there are multiple bindings per frame and the texts are linked to each binding rather than its frame.
- Consider whether the frame's name (text) should move along with the frame.
- Consider whether arrows should be animated (likely not, as the arrows can change shape so it might look weird / be hard to implement).
- Move function objects and arrays along with the frame.

* Squashed commit of the following:

commit 2979582
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Mar 17 00:23:22 2026 +0000

    chore(deps): update blueprintjs to v6.10.0 (#3673)

    * chore(deps): update blueprintjs to v6.10.0

    * Update test snapshots

    ---------

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>

commit 9aef777
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Tue Mar 17 01:00:27 2026 +0800

    Upgrade jsdom to v29 (#3672)

    * Upgrade jsdom to v29

    * Update some snapshots

    * Fix tests

    * Increase test timeout

commit 0ab537b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 16:06:50 2026 +0000

    chore(deps): update dependency eslint-plugin-react-hooks to v7 (#3484)

    * chore(deps): update dependency eslint-plugin-react-hooks to v7

    * Fix breaking changes

    ---------

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>

commit 5184d62
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 23:54:40 2026 +0800

    Fix concurrent precache logic (#3671)

    * Create own copy of precaching-striping

    * Remove old version

    * Update SW

    * Fix `this` binding

commit 2d06530
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 23:23:42 2026 +0800

    Upgrade Vite/Vitest ecosystem dependencies to v8 (#3670)

    * Use modern `paths` format for tsconfig

    * Fix type imports

    * Upgrade Vite ecosystem to v8

    * Fix missing await

commit 4de3cfa
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 23:19:34 2026 +0800

    Concurrently precache assets (#3669)

    * Add precache-striping

    * Clean up rsbuild config

    * Remove now-unneeded Node polyfills

    * Fetch assets concurrently

commit 01b028f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 22:50:53 2026 +0800

    chore(deps): update dependency i18next to v25.8.18 (#3668)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 7e34573
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 22:45:11 2026 +0800

    Group Renovate BlueprintJS updates (#3666)

    * Set up Renovate dep groups

    * Undo dev-deps groupign

commit 07e9128
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Mon Mar 16 22:34:18 2026 +0800

    CSE Machine : Fix nano bugs (#3667)

    * Fix nano bugs

    * Fix unnormalized line endings

    ---------

    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>

commit 5767324
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 13:21:04 2026 +0000

    chore(deps): update dependency react-i18next to v16.5.7 (#3664)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit c228254
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 13:16:28 2026 +0000

    chore(deps): update dependency @rsbuild/plugin-svgr to v1.3.1 (#3663)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 0095e10
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Mon Mar 16 21:12:49 2026 +0800

    Upgrade React ecosystem dependencies to v19 (#3247)

    * Upgrade React ecosystem dependencies to v19

    * Fix some breaking changes

    * Fix more breaking changes

    * Fix remaining codebase errors

    * Fix some test errors

    * Update AcademyNavigationBar.tsx

    * Fix remaining test error

    * Fix missed type bug

    * Remove deprecated react-test-renderer

    * Delete useless test

    * Update some snapshots

    * Update more snapshots

    * Fix some tests and snapshots

    * Update more snapshots

    * Update Repl tests

    * Update editor tests

    * Update lockfile post-merge

    * Fix JSX namespace errors

    * Update dependencies post-merge

    * Deduplicate dependencies

    * Update snapshots post-merge

    * Update lockfile post-merge

    * Update snapshots

    * Fix breaking type changes

    * Remove shallow render

    * Remove shallow render from tests

    * Remove unused import

    * Fix more tests

    * Clean up snapshots

    * Fix tests double render

    * Update snapshots

    * Replace react-sortable-hoc with dnd-kit

    * Update dep constraints

    * Install `@dnd-kit/core`

    * Migrate sortable list to dnd-kit

    * Fix tests rendering

    * Add TODOs

    * Address phantom dependency

commit c928c31
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:54:21 2026 +0000

    chore(deps): update dependency sass to v1.98.0 (#3657)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 307a8d1
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:50:20 2026 +0000

    chore(deps): update dependency @rsbuild/plugin-sass to v1.5.1 (#3661)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit b132f3b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:46:40 2026 +0000

    chore(deps): update dependency @rsbuild/plugin-react to v1.4.6 (#3660)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 9db226b
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 10:42:57 2026 +0000

    chore(deps): update dependency dompurify to v3.3.3 (#3658)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 298b27f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 16 18:37:22 2026 +0800

    chore(deps): update dependency @sentry/react to v10.43.0 (#3656)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 7f33412
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Mar 15 12:27:50 2026 +0000

    chore(deps): update dependency typescript-eslint to v8.57.0 (#3654)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 20933ef
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Mar 15 12:23:36 2026 +0000

    chore(deps): update dependency react-simple-keyboard to v3.8.172 (#3655)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 93ec2a6
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sun Mar 15 12:19:41 2026 +0000

    chore(deps): update dependency eslint to v9.39.4 (#3649)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 0024c6a
Author: Roger Zhang <rogerteo200@gmail.com>
Date:   Sun Mar 15 20:16:24 2026 +0800

    QOL: Arrows bending too early or too late (#3653)

    * feat: colour-coding arrows

    * feat: removed colour-coding for arrows (all white), implemented feature where clicked arrows remain highlighted

    * fix: removed whitespace

    * fix: bugfix and linting

    * test2

    * fix: Refactor arrow selection management and clean up code style

    * fix: ran linter

    * fix: snapshots

    * fix: change to american english for the word "color"

    * fix: faded arrows now stay faded

    * test

    * test

    * fix: prematurely terminating arrows

    * added global MinTerminalSegmentLength

commit 4b9af0d
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Fri Mar 13 17:56:39 2026 +0800

    CSE Machine : Fixes Cache and Arrow displacement errors (#3650)

    * Fixed arrow change!

    * Fixed the cache difference issue

    * Fixed tsc error - II

commit ff7ab4f
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Wed Mar 11 14:23:57 2026 +0800

    chore(deps): update dependency react-i18next to v16.5.5 (#3648)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit b822ca5
Author: Ho Ke Ying <168710875+Oofky@users.noreply.github.com>
Date:   Wed Mar 11 01:09:26 2026 +0800

    Changed hotkey for hulk mode (#3647)

    Changed from alt+shift+h to ctrl+alt+h

commit 90066a6
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Tue Mar 10 20:54:53 2026 +0800

    Hulk fix (#3600)

    * Hulk Fix!
    Initial commit

    * Changed the faded colours to fit

    Fits the green screen background better for a faded effect

    * Fixed the formatting!

    * Revert foreground colors

    For its intended use on dark backgrounds after chroma keying

    * Fixed formatting

    ---------

    Co-authored-by: Oofky <beensprouting@gmail.com>

commit 797aecd
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Tue Mar 10 14:31:17 2026 +0800

    CSE Machine : Function Descriptions modification for Frame overlap (#3627)

    * Added the removeDeadFrames feature
    Only dead frames disappear as of right now, for function objects and the rest, work to be done

    Animations : will be done by Keying!

    * Added the functionality for toggle of dead vs ONLY live for
    	function closure objects
    	Generic Arrow
    	Text (recursively automated)
    	Arrays and hence pairs as well

    * Fix : Removed gaps
    Finally processed the logic by recomputing the envTree for the specific step when the toggle is on

    * Fix : CI format errors and made it from checkbox -> onClick button!

    * Fix : Toggle -> One time cleanup

    * Changed from Hide -> Clear and the icon

    * Fixed the following errors and implemented suggestions
    1. Fixed the snapshot and lint erros
    2. Added the disable feature (as suggested by @sayomaki) where to suggest that its CLEAR and not HIDE, we disable after pressing once!!
    3. Changed all instances of hide to clear in our current implementation!

    * Fixed tsc error

    * Fixed the sentry bot suggestion

    * Fixed the error where the frames WERE not moving due to the Layout team's invariant!
    Now the frames do move by violating their invariant ONLY if the Clear mode is ON

    * Version 1

    * Version 2

    * Added the following functionalities
    1. Capped out the func desc box's widths
    2. Click to reveal FULL length descriptions in normal mode
    3. Fixed gaps between the FRAMES in PRINTABLE mode

    * Fixed a bug where the gap between two frames was not dynamically being set and was capped out!
    1. This makes every other test case which we have made look MUCH better!
    2. Secondly, we also fixed a bug where recursive closure objects' description boxes' width and length was NOT being
    	accounted for

    * Fixed format error

    * cse layout: normalize frame width accounting and add printable fn description spacing

    - normalize Frame width semantics:
      - totalWidth now represents only frame block width
      - totalDataWidth is computed as true overflow beyond frame right edge
      - remove pre-estimation path that double-counted spacing in some cases
    - update Level width derivation to include last frame totalDataWidth
    - improve printable mode readability for function descriptions:
      - add small vertical offset above printable fn description labels
      - add tiny bottom gap below printable fn description boxes
      - propagate new spacing to Binding and ArrayValue height calculations

    This reduces excessive horizontal gaps and mitigates small printable-mode overlaps between fn description boxes
    and nearby array/binding content.
    Also removed the excess frame offset width given for safety that was NOT dynamic!
    So now, the frame width gapping is dynamic!

    * Fixed format errors

    * Fixed sentry's bot error

    * Fixed #3639 by adding closing parantheses

    * Fix stationary x-coordinates for normal and printable modes:

    - Populates both Normal and Printable caches upfront in drawCse.
    - Removes redundant cache generation logic from redraw.
    - Prevents premature cache clearing in clearCse to maintain stability.

    * removed comments and console logs

    * Fixed format errors

    ---------

    Co-authored-by: Martin Henz <henz@comp.nus.edu.sg>
    Co-authored-by: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
    Co-authored-by: gigopogy <ethanlockzy@gmail.com>

commit 3e7e0df
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Mar 10 11:55:38 2026 +0800

    chore(deps): update dependency react-simple-keyboard to v3.8.168 (#3644)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit e678e7e
Author: Ho Ke Ying <168710875+Oofky@users.noreply.github.com>
Date:   Tue Mar 10 06:30:00 2026 +0800

    Fixed liveness bug for null array units  (#3642)

    * Fixed null array units liveness

    Fixed the issue where null array units sometimes still have the default stroke color, despite being dead

    * Fixed format errors

    ---------

    Co-authored-by: Martin Henz <henz@comp.nus.edu.sg>

commit d331a5d
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:28:37 2026 +0000

    chore(deps): update dependency @swc/core to v1.15.18 (#3636)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit fbf7e64
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:23:15 2026 +0000

    chore(deps): update dependency i18next to v25.8.14 (#3640)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit e0649aa
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:14:09 2026 +0000

    chore(deps): update dependency dompurify to v3.3.2 [security] (#3635)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 2563a62
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Mon Mar 9 20:05:44 2026 +0000

    chore(deps): update dependency @sentry/react to v10.41.0 (#3638)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

commit 094601a
Author: Richard Dominick <34370238+RichDom2185@users.noreply.github.com>
Date:   Tue Mar 10 04:00:38 2026 +0800

    Fix lockfile and other incorrect changes (#3643)

    * Revert some lockfile changes from 1088

    * Bump Yarn to 4.13.0

    * Fix snapshots

commit 49dadc8
Author: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Date:   Thu Mar 5 23:39:45 2026 +0800

    CSE Machine : Fixed the NavBar  (#3630)

    * Fixed the errors

    * Fixed format errors

    * Fixed inequality overlook

* Revert "Squashed commit of the following:"

This reverts commit 516fd22.

* Binding keys' text moves with frames

Currently, binding values don't move, including texts. Only the text of keys move.

Test code (for my own easy access):
function foo() {
    function f(x) {
        function g() {
            const y = list(1, 2);
            return y;
        }
        return g;
    }
    return f;
}
foo()(4)();
foo()(5)();

New issue:
- For some reason, the array value in the above code disappears after clicking Clear Dead Frames, but it reappears if we click print mode.

To do:
- Make binding values move with the frame. This should be implemented for each type of value, for example array or func object or primitive text.
- Consider whether the frame's name (text) should move along with the frame.
- Consider whether arrows should be animated (likely not, as the arrows can change shape so it might look weird / be hard to implement).
- Move function objects and arrays along with the frame. (Ones that may not be binded, unless invisible bindings handle this)

* PrimitiveValue texts move + dummy bindings dont

Primitive text values now move with the frame! Fixed an issue where dummy bindings were appearing during the animation, which was unintended.

* FnObjects shift, but new major problem

Saving this in case I want to revert while fixing major problem

* FnObjects shift properly, major problem fixed

* Arrays mostly shift properly

Except ArrayNullUnit and text primitive values. Text primitive values have a weird offset that needs to be accounted for.

Test code (for my own easy access):
function foo() {
    function f(x) {
        let r = [1, 2, () => 2];
        function g() {
            const y = list(1, () => 2);
            let k = [];
            return () => y[0];
        }
        return g;
    }
    return f;
}
foo()(4)();
foo()(5)()();

TODO:
1. Create ArrayNullUnit animation
2. Fix text primitive values animation
3. Make arrows disappear during the animation, because animating the arrows is not a feasible idea
4. Possibly clean up the code, as currently there is a lot of repeated code

* Changed text to truncated version

* Fixed imports

* Update src/features/cseMachine/animationComponents/ClearDeadFramesAnimation.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/features/cseMachine/CseMachineUtils.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update src/features/cseMachine/animationComponents/ClearDeadFramesAnimation.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Arrows now are HIDDEN during animation

* Fixed formatting

* ArrayNullUnits shift

* Fixed imports

* Fixed formatting

* Fixed bug as suggested by Gemini

To do: Center alignment does not work with the animations right now and crashes. This needs to be fixed or animations should be disabled when center alignment is switched on.

* Added try finally for restoring Layout.draw

* Fixed the global frame's built in funcs disappearance

* Fixed formatting

* Added defensive checks suggested by sentry bot

* Remove the grey covers

* Fixed formatting and globalFns not responding to animation

* Text moving FAR too left? not anymore!

* annoying format and tsc error

* Frame names animation

* Update src/features/cseMachine/animationComponents/ClearDeadFramesAnimation.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* stupid Gemini mistake

* Deleted accidental duplicated code

* Readded KonvaGroup related to Zoom and Save fix

* Log warning instead of throw error

* Fixed formatting

* Added check for duplicate functions / arrays

+ added defensive check as requested by sentry

* Weird git didnt push my code fully

---------

Co-authored-by: Vemulapalli Akshay <akshayvemulapalli2007@gmail.com>
Co-authored-by: Akshay-2007-1 <131676168+Akshay-2007-1@users.noreply.github.com>
Co-authored-by: Akshay-2007-1 <e1668621@u.nus.edu>
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.

4 participants