Skip to content

CSE Machine : Function Descriptions modification for Frame overlap#3627

Merged
martin-henz merged 35 commits intosource-academy:masterfrom
Akshay-2007-1:fix-cse
Mar 10, 2026
Merged

CSE Machine : Function Descriptions modification for Frame overlap#3627
martin-henz merged 35 commits intosource-academy:masterfrom
Akshay-2007-1:fix-cse

Conversation

@Akshay-2007-1
Copy link
Copy Markdown
Contributor

@Akshay-2007-1 Akshay-2007-1 commented Mar 4, 2026

Description

This PR addresses the printable mode overlap issue identified in #3602 and is relevant to the issues #3624.

This PR:

  • Moves function descriptions in Print mode to the bottom of function objects (instead of being to the right of function objects), which is also consistent with the textbook. (Refer to @martin-henz's comment ) This allows the CSE machine to be more compact.
  • Implements a cap for function descriptions in Print mode, which was previously not implemented as seen below:
Before After
image image
  • Assigns more vertical space for function objects to account for edge cases of overlapping function descriptions that involve arrays and nested recursive arrays/lists with closures. (Do note that though these scenarios seldom occur in the actual course work, we assume the worst case!)
  • Do note that this elongation happens only in the Printable mode so that unnecessary visual gaps are not present in the normal mode where descriptions only appear on hovering!
Normal Printable
image image

Clearly, in the Printable mode we dynamically make sure that the height is MORE than the normal mode as illustrated above

  • Before passing on the frames to the Layout team's implementation of the ghost algorithm, we change the widths of frames that includes the bindings and total widths of arrays including recursive calculations as well. This way, before the x-coordinates are fixed, we ensure that they are fixed in the way we want them to be making sure that no overlaps happen!
Before After
image image
image image
  • In the normal mode, for function descriptions that are very wide, even on hovering, we will only see the compact form of the description of that function object while for the full view, you can click on the object! This is demonstrated below :
Video.Project.3.mp4
  • Earlier, the parantheses and the body closing curly bracket were not in place due to truncation but a recent commit fixed that!
image

Closes #3602
Closes #3624
Closes #3639

Concerns:

  • Since more vertical space is allocated in frames to account for function descriptions being below function objects, there is now a new issue. After clicking Clear Dead Frames, if function objects are dead, it creates a very ugly elongated frame. This can be fixed in a future PR after all issues regarding the function description's layout is fixed and an issue will be made for the same soon.
    For the code below,
function foo(x) {
    return x;
}
const b = x => x => x => 5;
b(1)(1)(1);
function e() {
    return [() => 1, () => 1, () => 1];
}
e();
foo(1);
foo(() => 1);
foo(1);
const a = () => 5;
const c = () => 5;
const d = () => 5;
Before erasure After erasure
image image
  • Sometimes, the width calculation done before passing on to the ghost algorithm for coordinate fixing goes a bit beyond what is expected and the visual gap increases more than expected in both the normal and the print modes! We are working towards fixing that. The same is illustrated below. (Credits to @ThatLi for the code being used as the test case here)
function foo() {
    function f(x) {
        return y => x + 3;
    }
    return f;
}
foo()(4);
foo()(5);
Before After
image image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

How to test

Test our code out with any of the following code snippets. The expected result also is given right underneath!

Test 1

// Test B: sibling frames with closures + nested arrays
function make_frame(id, n) {
  const arr = [];
  let i = 0;
  while (i < n) {
    const k = id * 100 + i;
    function add(x) {
      return x + k;
    }
    function combo(x) {
      return add(x) + k;
    }
    arr[i] = [add, combo, [list(add, combo), [i, i + 1, i + 2]]];
    i = i + 1;
  }
  return () => arr;
}

const frames = [];
let j = 0;
while (j < 4) {
  frames[j] = make_frame(j, 4);
  j = j + 1;
}

frames[0]();
frames[1]();
frames[2]();
frames[3]();
Before After
image image

Do note that for the above case, I am attaching only a fraction of the Layout for demonstration sake, there is a lot more frames actually. Moreover, note that one must increase the maximum steps to 4000 before running the above code.

Test 2

const arr = [
  x => x + 1,
  [y => y * 2, [z => z - 3, 99]],
  5
];
arr;
Normal Printable
image image

Test 3

function pack(n) {
  return [x => x + n, [y => y * n, [z => z - n]]];
}
const a1 = pack(2);
const a2 = pack(3);
[a1, a2];
Normal Printable
image image

For more test cases, please refer to the ones given by @ThatLi at #3602. You will notice that they dont overlap anymore!

Checklist

  • I have tested this code
  • I have updated the documentation

Akshay-2007-1 and others added 20 commits February 19, 2026 15:52
Only dead frames disappear as of right now, for function objects and the rest, work to be done

Animations : will be done by Keying!
	function closure objects
	Generic Arrow
	Text (recursively automated)
	Arrays and hence pairs as well
Finally processed the logic by recomputing the envTree for the specific step when the toggle is on
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!
…am's invariant!

Now the frames do move by violating their invariant ONLY if the Clear mode is ON
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
…g 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
…cription 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!
@Akshay-2007-1 Akshay-2007-1 marked this pull request as ready for review March 9, 2026 05:34
Comment thread src/features/cseMachine/components/Frame.tsx
@source-academy source-academy deleted a comment from sentry Bot Mar 9, 2026
@Akshay-2007-1 Akshay-2007-1 marked this pull request as draft March 9, 2026 05:39
gigopogy added 2 commits March 9, 2026 23:12
- 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.
@Akshay-2007-1 Akshay-2007-1 marked this pull request as ready for review March 9, 2026 16:35
@Akshay-2007-1
Copy link
Copy Markdown
Contributor Author

The arrow team's fix that is awaited (detailed at #3633) can be made into a seperate PR.
Hence, we are getting this ready for review.
Some testing is awaited by @Oofky. Once that is down, it can be merged after review by maintainers!

Comment on lines 239 to 241
CseMachine.stash = undefined;
}
CseMachine.setClearDeadFrames(false);

This comment was marked as outdated.

Comment thread src/features/cseMachine/CseMachine.tsx Outdated
Comment on lines +139 to +149
const originalMode = CseMachine.getPrintableMode();

CseMachine.printableMode = true;
CseMachine.setMasterLayout(Layout.getLayoutPositions(this.controlStash));

CseMachine.printableMode = false;
CseMachine.setMasterLayout(Layout.getLayoutPositions(this.controlStash));

// 3. Restore the user's actual mode setting
CseMachine.printableMode = originalMode;
}

This comment was marked as outdated.

Comment on lines -200 to -203

if (isDataArray(head)) {
const branchWidth = getChainWidth(head);
maxWidth = Math.max(maxWidth, currentSpineX + branchWidth);

This comment was marked as outdated.

Comment on lines +138 to +148
// fill up both lookup table of normal mode and printable mode
const originalMode = CseMachine.getPrintableMode();

CseMachine.printableMode = true;
CseMachine.setMasterLayout(Layout.getLayoutPositions(this.controlStash));

CseMachine.printableMode = false;
CseMachine.setMasterLayout(Layout.getLayoutPositions(this.controlStash));

// 3. Restore the user's actual mode setting
CseMachine.printableMode = originalMode;

This comment was marked as outdated.

Comment on lines +103 to +106
this.printDescriptionOffsetY = Math.ceil(Config.TextPaddingY / 2);
this.printDescriptionBottomGap = Math.ceil(Config.TextPaddingY / 2);
this.totalWidth =
this._width +
Config.TextPaddingX * 2 +
10 +
(CseMachine.getPrintableMode() ? this.exportTooltipWidth : this.tooltipWidth);
this._width + Config.TextMargin + this.exportTooltipWidth + Config.FnTooltipTextPadding * 2;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: In printable mode, the layout incorrectly reserves horizontal space for function descriptions, even though they are rendered vertically, causing excessive spacing between frames.
Severity: HIGH

Suggested Fix

In Frame.tsx, when calculating valueRightX for FnValue or GlobalFnValue in printable mode, use value.x() + value.width() instead of value.x() + value.totalWidth. This will correctly use the function circle's width for horizontal spacing, ignoring the tooltip width which is not relevant as the tooltip is rendered below.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/features/cseMachine/components/values/FnValue.tsx#L103-L106

Potential issue: In printable mode, the `totalDataWidth` for `FnValue` and
`GlobalFnValue` is calculated using `value.totalWidth`, which incorrectly includes the
horizontal width of the function's description tooltip. However, in this mode, the
description is rendered vertically below the function, not horizontally beside it. This
miscalculation causes the layout engine to reserve unnecessary horizontal space between
frames, leading to an excessively wide diagram and undermining the goal of a more
compact printable view.

Comment on lines +142 to +145
CseMachine.setMasterLayout(Layout.getLayoutPositions(this.controlStash));

CseMachine.printableMode = false;
CseMachine.setMasterLayout(Layout.getLayoutPositions(this.controlStash));

This comment was marked as outdated.

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 22877742440

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 72 of 112 (64.29%) changed or added relevant lines in 10 files are covered.
  • 3 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.05%) to 41.091%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/features/cseMachine/components/Frame.tsx 13 14 92.86%
src/pages/playground/Playground.tsx 0 1 0.0%
src/features/cseMachine/CseMachineUtils.ts 23 25 92.0%
src/features/cseMachine/CseMachine.tsx 14 20 70.0%
src/features/cseMachine/components/values/FnValue.tsx 6 21 28.57%
src/features/cseMachine/components/values/GlobalFnValue.tsx 6 21 28.57%
Files with Coverage Reduction New Missed Lines %
src/features/cseMachine/components/values/FnValue.tsx 1 63.25%
src/features/cseMachine/components/values/GlobalFnValue.tsx 1 52.44%
src/features/cseMachine/CseMachine.tsx 1 39.31%
Totals Coverage Status
Change from base Build 22873320594: 0.05%
Covered Lines: 5401
Relevant Lines: 12204

💛 - Coveralls

@martin-henz martin-henz self-requested a review March 10, 2026 06:29
Copy link
Copy Markdown
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

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

I just looked at #3646
I played around with examples and see that it does what it's supposed to do, so I approved it after glancing over the changes. It looks all reasonable to me.

I approve so we can merge. My hunch is that we should merge this so that the other teams can make use of the changes. I have a separate concern that I will discuss in telegram in in a future issue.

@martin-henz martin-henz merged commit 797aecd into source-academy:master Mar 10, 2026
7 checks passed
@Akshay-2007-1 Akshay-2007-1 deleted the fix-cse branch March 10, 2026 17:13
Copy link
Copy Markdown
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

@Akshay-2007-1 please make a PR to revert these changes.

Comment thread src/global.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

? Can we revert?

Comment thread .coverage-fix.tmp
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

???

Comment thread et --hard 25755a4c
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

???!?!??!!

@Akshay-2007-1 Akshay-2007-1 mentioned this pull request Mar 16, 2026
7 tasks
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

7 participants