From 75514cf387b625346d38b762f1de188ff567aade Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 11:55:52 +0000 Subject: [PATCH 1/2] Fit the union-find forest on phones The union-find lab starts with eight one-node sets, spaced as if each were a tree, so the drawing was 513 units wide with a 410 px minimum: 110 px wider than a 390 px phone. Single-node sets now take a smaller gap, the minimum width applies from sm up (through a CSS variable, since it depends on the drawing), and node labels use a larger font on phones. The positions now span the drawing's full width, so the forest is centred instead of sitting slightly left. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp --- docs/autopilot.md | 1 + src/components/mdx/DataStructureVisualizers.tsx | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/autopilot.md b/docs/autopilot.md index e88b32c..0671f35 100644 --- a/docs/autopilot.md +++ b/docs/autopilot.md @@ -92,6 +92,7 @@ Nothing. The exam-stack block (since 2026-11-06, over #68's inline practice ques Newest first. One line per run: date and run, what was done, PR link, merged or open. +- 2026-11-20 14:50 (run C): from the 2026-11-12 audit, the Data Structures union-find forest (110 px too wide at 390 px in its starting state of 8 singletons) now fits: single-node sets take a smaller gap, the minimum width applies from sm up, node labels are larger on phones (at least 15 px, nodes at least 24 px wide to tap), and the forest is centred. PR #PRNUM, open. - 2026-11-17 14:50 (run C): from the 2026-11-12 audit, the Computer Organization `bits-and-bytes` unit ladder (124 px too wide at 390 px) now fits. Its captions now sit under their bars in a two-column grid at every width, which also fixes the desktop TB and PB captions wrapping unindented, and "2^0 = 1 bytes" now reads "1 byte". PR #99, open. Its CI check is red only because main is: The Exam Mind's round 7 (#97) renamed a heading that a bank question points at; fixed in PR #100. - 2026-11-17 10:40 (run B): exam phase 4c, Computer Organization: +26 questions over all 9 taught lessons, numbers checked by script (500 GB shown as 465.7, G = 01000111, 2¹⁶ and 2¹² locations, the disk capacity 516,096,000 bytes, 4.2 ms average wait at 7,200 rpm). PR #96, open, stacked on #94. - 2026-11-17 06:10 (run A): exam phase 4c, Microprocessors: +34 questions over all 11 taught lessons, every value checked by script (C8h + 64h flags, CS:IP and segment limits, effective address, MUL/DIV results, XOR case flip, LOOP sum, SP after push/pop, INT 21h vector at 84h). PR #94, open, stacked on #91. diff --git a/src/components/mdx/DataStructureVisualizers.tsx b/src/components/mdx/DataStructureVisualizers.tsx index b979b4b..5e8cefc 100644 --- a/src/components/mdx/DataStructureVisualizers.tsx +++ b/src/components/mdx/DataStructureVisualizers.tsx @@ -565,13 +565,16 @@ export function UnionFindLab() { placed.push({ v, x, y: d, parent }); return x; }; + // a set of one needs less room than a tree, so the eight starting singletons fit a phone + let lastGap = 0.4; roots.forEach((r) => { lay(r, 0, null); - col += 0.4; + lastGap = kids(r).length ? 0.4 : 0.15; + col += lastGap; }); const maxD = Math.max(...placed.map((p) => p.y)); const W = Math.max(300, col * 44 + 20); - const X = (x: number) => 26 + (x / Math.max(1, col - 0.4)) * (W - 52); + const X = (x: number) => 26 + (x / Math.max(1, col - lastGap - 1)) * (W - 52); const Y = (y: number) => 24 + y * 54; const pos = new Map(placed.map((p) => [p.v, p])); return ( @@ -582,7 +585,7 @@ export function UnionFindLab() {
- + {placed.map((p) => { if (p.parent === null) return null; const q = pos.get(p.parent)!; @@ -592,7 +595,7 @@ export function UnionFindLab() { click(p.v)}> - {p.v} + {p.v} ))} From 437e5e32f58b1f71189fa0f31ac474fe1b72fb44 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 11:55:57 +0000 Subject: [PATCH 2/2] Log run: PR #110 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp --- docs/autopilot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/autopilot.md b/docs/autopilot.md index 0671f35..14b8eb9 100644 --- a/docs/autopilot.md +++ b/docs/autopilot.md @@ -92,7 +92,7 @@ Nothing. The exam-stack block (since 2026-11-06, over #68's inline practice ques Newest first. One line per run: date and run, what was done, PR link, merged or open. -- 2026-11-20 14:50 (run C): from the 2026-11-12 audit, the Data Structures union-find forest (110 px too wide at 390 px in its starting state of 8 singletons) now fits: single-node sets take a smaller gap, the minimum width applies from sm up, node labels are larger on phones (at least 15 px, nodes at least 24 px wide to tap), and the forest is centred. PR #PRNUM, open. +- 2026-11-20 14:50 (run C): from the 2026-11-12 audit, the Data Structures union-find forest (110 px too wide at 390 px in its starting state of 8 singletons) now fits: single-node sets take a smaller gap, the minimum width applies from sm up, node labels are larger on phones (at least 15 px, nodes at least 24 px wide to tap), and the forest is centred. PR #110, open. - 2026-11-17 14:50 (run C): from the 2026-11-12 audit, the Computer Organization `bits-and-bytes` unit ladder (124 px too wide at 390 px) now fits. Its captions now sit under their bars in a two-column grid at every width, which also fixes the desktop TB and PB captions wrapping unindented, and "2^0 = 1 bytes" now reads "1 byte". PR #99, open. Its CI check is red only because main is: The Exam Mind's round 7 (#97) renamed a heading that a bank question points at; fixed in PR #100. - 2026-11-17 10:40 (run B): exam phase 4c, Computer Organization: +26 questions over all 9 taught lessons, numbers checked by script (500 GB shown as 465.7, G = 01000111, 2¹⁶ and 2¹² locations, the disk capacity 516,096,000 bytes, 4.2 ms average wait at 7,200 rpm). PR #96, open, stacked on #94. - 2026-11-17 06:10 (run A): exam phase 4c, Microprocessors: +34 questions over all 11 taught lessons, every value checked by script (C8h + 64h flags, CS:IP and segment limits, effective address, MUL/DIV results, XOR case flip, LOOP sum, SP after push/pop, INT 21h vector at 84h). PR #94, open, stacked on #91.