Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
284 changes: 284 additions & 0 deletions dashboard/cells/frank/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
:root {
--bg: #0b120d; --ink: #d8f5e0; --ink-2: #8fbf9f; --ink-3: #55805f;
--green: #35e07c; --green-dim: #1f9e57; --amber: #e0b435; --line: #1d3323;
}
* { margin: 0; box-sizing: border-box; }
body {
background: var(--bg); color: var(--ink);
font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
height: 100vh; overflow: hidden;
display: flex; flex-direction: column;
}
/* sized against the cell's own frame (container units): compact in the
grid tile, large on the fullscreen monitor scene */
.stage {
flex: 1; min-height: 0; container-type: size;
display: flex; flex-direction: column;
align-items: center; justify-content: center;
gap: .7em; padding: clamp(10px, 5cqmin, 56px);
text-align: center;
font-size: clamp(13px, min(3.9cqw, 8.5cqh), 60px);
}
.bump { font-size: .55em; color: var(--ink-3); transition: opacity .4s; }
.bump::before { content: "$ "; color: var(--green-dim); }
.main {
line-height: 1.35; max-width: 24em; text-wrap: balance;
transition: opacity .4s;
}
.sub {
font-size: .6em; color: var(--ink-2); max-width: 36em;
text-wrap: balance; transition: opacity .4s;
}
.fail { color: var(--amber); }
.ok { color: var(--green); }
.fade { opacity: 0; }

/* Captain Semver: an original parody hero who trusts version numbers */
.scene { display: none; transition: opacity .4s; width: min(92cqw, 150cqh); max-height: 52cqh; }
.scene.on { display: block; }
.scene text { font-family: inherit; }
.scene .hero, .scene .wall { transform-box: view-box; }
.scene .shield { transform-box: fill-box; transform-origin: center; }
.scene.run .shield { animation: throw 2.3s ease-in-out forwards; }
.scene.run .hero { animation: fall 2.3s ease-in forwards; transform-origin: 70px 170px; }
.scene.run .wall { animation: shake 2.3s linear forwards; }
.scene.run .stars { animation: stars 2.3s linear forwards; }
.scene .stars, .scene .crack, .scene .bot, .scene .sparks { opacity: 0; }
.scene .bot, .scene .wrench, .scene .sparks { transform-box: view-box; }
.scene.run .crack { animation: crack 2.3s linear forwards; }

/* act 2: the repair bot fixes the breaking change */
.scene.fix .hero { animation: getup 3.3s ease-in-out forwards; transform-origin: 70px 170px; }
.scene.fix .shield { animation: restore 3.3s ease-in-out forwards; }
.scene.fix .crack { animation: uncrack 3.3s linear forwards; }
.scene.fix .stars { animation: dizzy-off 3.3s linear forwards; }
.scene.fix .bot { animation: roll-in 3.3s ease-out forwards; }
.scene.fix .wrench { animation: tighten 3.3s ease-in-out forwards; transform-origin: 176px 150px; }
.scene.fix .sparks { animation: sparks 3.3s steps(2) forwards; }
/* act 3: repaired, the second throw breaks through */
.scene .debris rect { opacity: 0; transform-box: fill-box; transform-origin: center; }
.scene.win .bot { opacity: 1; }
.scene.win .shield { animation: throw2 2.3s ease-in-out forwards; }
.scene.win .wallbody { animation: crumble 2.3s ease-in forwards; transform-box: fill-box; transform-origin: bottom; }
.scene.win .debris rect { animation: fly 2.3s ease-out forwards; }
.scene.win .hero { animation: cheer 2.3s ease-in-out forwards; }
@keyframes throw2 {
0%, 12% { transform: translate(0, 0) rotate(0); }
42% { transform: translate(196px, 0) rotate(720deg); }
80%, 100% { transform: translate(0, 0) rotate(1440deg); }
}
@keyframes crumble {
0%, 41% { opacity: 1; transform: scaleY(1); }
60%, 100% { opacity: 0; transform: scaleY(.1); }
}
@keyframes fly {
0%, 41% { opacity: 0; transform: translate(0, 0) rotate(0); }
43% { opacity: 1; }
75% { opacity: 1; }
100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
}
@keyframes cheer {
0%, 82% { transform: translateY(0); }
88% { transform: translateY(-10px); }
94%, 100% { transform: translateY(0); }
}
@keyframes crack { 0%, 44% { opacity: 0; } 46%, 100% { opacity: 1; } }
@keyframes uncrack { 0%, 52% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes dizzy-off { 0% { opacity: 1; } 10%, 100% { opacity: 0; } }
@keyframes roll-in {
0% { opacity: 1; transform: translateX(170px); }
22%, 100% { opacity: 1; transform: translateX(0); }
}
@keyframes tighten {
0%, 24% { transform: rotate(0); }
30% { transform: rotate(-35deg); } 36% { transform: rotate(0); }
42% { transform: rotate(-35deg); } 48% { transform: rotate(0); }
54% { transform: rotate(-35deg); } 60%, 100% { transform: rotate(0); }
}
@keyframes sparks {
0%, 26% { opacity: 0; } 28%, 58% { opacity: 1; } 60%, 100% { opacity: 0; }
}
@keyframes restore {
0%, 62% { transform: translate(42px, 58px) rotate(1300deg); }
90%, 100% { transform: translate(0, 0) rotate(1440deg); }
}
@keyframes getup {
0%, 62% { transform: rotate(-84deg); }
86% { transform: rotate(6deg); }
100% { transform: rotate(0); }
}
@keyframes throw {
0%, 12% { transform: translate(0, 0) rotate(0); }
45% { transform: translate(196px, 0) rotate(720deg); }
68% { transform: translate(-28px, -30px) rotate(1080deg); }
85% { transform: translate(30px, 58px) rotate(1260deg); }
92% { transform: translate(38px, 52px) rotate(1280deg); }
100% { transform: translate(42px, 58px) rotate(1300deg); }
}
@keyframes fall {
0%, 66% { transform: rotate(0); }
82% { transform: rotate(-84deg); }
90% { transform: rotate(-78deg); }
100% { transform: rotate(-84deg); }
}
@keyframes shake {
0%, 44% { transform: translateX(0); }
47% { transform: translateX(4px); }
50% { transform: translateX(-3px); }
53%, 100% { transform: translateX(0); }
}
@keyframes stars {
0%, 80% { opacity: 0; }
86%, 100% { opacity: 1; }
}
.caption {
flex: none; text-align: center; color: var(--ink-2);
padding: 6px 12px 8px; border-top: 1px solid var(--line);
font-size: clamp(10px, 2.1vw, 24px); text-wrap: balance;
}
.caption b { color: var(--green); font-weight: 400; }
footer {
flex: none; display: flex; align-items: baseline; gap: .7rem;
padding: 5px 10px; border-top: 1px solid var(--line);
font-size: 11px; color: var(--ink-3);
}
footer b { color: var(--green); font-weight: 400; }
footer a { margin-left: auto; }
a { color: var(--green-dim); text-decoration: none; }
a:hover { color: var(--green); }
</style>
</head>
<body>
<main class="stage">
<div class="bump" id="bump"></div>
<svg class="scene on" id="scene" viewBox="0 0 400 190" role="img"
aria-label="Captain Semver throws his shield at a minor version bump; it bounces back and knocks him over">
<line x1="10" y1="171" x2="390" y2="171" stroke="#1d3323" stroke-width="2"/>
<!-- the "minor" release, as a brick wall -->
<g class="wall">
<g class="wallbody">
<rect x="330" y="50" width="50" height="121" fill="#0f1a12" stroke="#55805f"/>
<path d="M330 70h50M330 90h50M330 110h50M330 130h50M330 150h50
M355 50v20M342 70v20M368 70v20M355 90v20M342 110v20M368 110v20M355 130v20M342 150v21M368 150v21"
stroke="#1d3323" stroke-width="1.5"/>
</g>
<text x="355" y="38" fill="#e0b435" font-size="12" text-anchor="middle">your build</text>
</g>
<!-- bricks flying when the wall finally breaks -->
<g class="debris" fill="#0f1a12" stroke="#55805f">
<rect x="335" y="70" width="14" height="9" style="--dx:40px;--dy:-30px;--r:160deg"/>
<rect x="352" y="88" width="14" height="9" style="--dx:60px;--dy:10px;--r:-120deg"/>
<rect x="340" y="108" width="14" height="9" style="--dx:30px;--dy:40px;--r:200deg"/>
<rect x="360" y="60" width="14" height="9" style="--dx:55px;--dy:-45px;--r:-200deg"/>
<rect x="345" y="130" width="14" height="9" style="--dx:45px;--dy:30px;--r:90deg"/>
<rect x="362" y="118" width="14" height="9" style="--dx:25px;--dy:45px;--r:-90deg"/>
</g>
<!-- Captain Semver -->
<g class="hero">
<path d="M72 86 L46 150 L68 140 L76 112 Z" fill="#1f9e57"/>
<line x1="74" y1="128" x2="64" y2="170" stroke="#d8f5e0" stroke-width="5" stroke-linecap="round"/>
<line x1="82" y1="128" x2="92" y2="170" stroke="#d8f5e0" stroke-width="5" stroke-linecap="round"/>
<rect x="68" y="84" width="22" height="46" rx="6" fill="#d8f5e0"/>
<text x="79" y="113" fill="#0b120d" font-size="16" font-weight="700" text-anchor="middle">^</text>
<line x1="86" y1="96" x2="108" y2="100" stroke="#d8f5e0" stroke-width="5" stroke-linecap="round"/>
<circle cx="79" cy="70" r="12" fill="#d8f5e0"/>
<rect x="68" y="64" width="22" height="6" rx="3" fill="#35e07c"/>
<path d="M80 59 L84 50 L86 59" fill="#35e07c"/>
<text x="79" y="22" fill="#8fbf9f" font-size="10" text-anchor="middle">CAPTAIN SEMVER</text>
</g>
<g class="stars" fill="#e0b435" font-size="12">
<text x="20" y="140">✦</text><text x="34" y="128">✦</text><text x="10" y="124">✦</text>
</g>
<!-- the shield: a caret range, ^1.4.2 -->
<g class="shield">
<circle cx="118" cy="100" r="16" fill="#35e07c"/>
<circle cx="118" cy="100" r="11" fill="#0b120d"/>
<circle cx="118" cy="100" r="7" fill="#35e07c"/>
<text x="118" y="104.5" fill="#0b120d" font-size="11" font-weight="700" text-anchor="middle">^</text>
<path class="crack" d="M110 86 L116 95 L112 101 L120 108 L117 116" fill="none" stroke="#e0b435" stroke-width="2.2"/>
</g>
<!-- the repair bot -->
<g class="bot">
<line x1="190" y1="128" x2="190" y2="120" stroke="#35e07c" stroke-width="1.5"/>
<circle cx="190" cy="119" r="2" fill="#35e07c"/>
<rect x="182" y="128" width="16" height="12" rx="2" fill="#1f9e57"/>
<circle cx="187" cy="134" r="1.6" fill="#0b120d"/><circle cx="193" cy="134" r="1.6" fill="#0b120d"/>
<rect x="179" y="141" width="22" height="22" rx="3" fill="#1f9e57"/>
<text x="190" y="156" fill="#0b120d" font-size="8" font-weight="700" text-anchor="middle">fix</text>
<circle cx="184" cy="166" r="4" fill="#55805f"/><circle cx="196" cy="166" r="4" fill="#55805f"/>
<g class="wrench">
<line x1="179" y1="150" x2="168" y2="152" stroke="#d8f5e0" stroke-width="3" stroke-linecap="round"/>
<path d="M168 152 m-4 -4 a4 4 0 1 0 2 7" fill="none" stroke="#d8f5e0" stroke-width="2.5"/>
</g>
<text x="190" y="112" fill="#8fbf9f" font-size="8" text-anchor="middle">auto-repair</text>
</g>
<g class="sparks" fill="#35e07c" font-size="10">
<text x="150" y="146">✦</text><text x="166" y="140">✧</text><text x="146" y="164">✧</text>
</g>
</svg>
<div class="main" id="main"></div>
<div class="sub" id="sub"></div>
</main>
<div class="caption">My research: <b>automatically repairing code broken by dependency updates.</b></div>
<footer>
<span>shields bounced back: <b id="count">0</b></span>
<a href="https://www.kth.se/profile/frankrg" target="_blank" rel="noopener">kth.se/profile/frankrg →</a>
</footer>
<script>
// Captain Semver trusts a "minor" version bump. It does not go well.
const bump = document.getElementById('bump');
const main = document.getElementById('main');
const sub = document.getElementById('sub');
const count = document.getElementById('count');
const scene = document.getElementById('scene');
const sleep = ms => new Promise(r => setTimeout(r, ms));
let bounced = 0;

async function show(els, render, hold) {
els.forEach(e => e.classList.add('fade'));
await sleep(400);
render();
els.forEach(e => e.classList.remove('fade'));
await sleep(hold);
}

function set(mainText, mainClass, subText) {
main.textContent = mainText;
main.className = 'main ' + (mainClass || '');
sub.textContent = subText || '';
}

async function captain() {
await show([bump, main, sub, scene], () => {
bump.textContent = 'bump shield 1.4.2 → 1.5.0';
set('“It\u2019s a minor bump. I trust the version number!”', '', '— Captain Semver');
scene.classList.remove('run', 'fix', 'win');
}, 2300);
scene.classList.add('run');
await sleep(2400);
count.textContent = ++bounced;
await show([main, sub], () => set('✗ the minor bump was a breaking change', 'fail',
'the shield came back. so did the bug.'), 3000);
await show([main, sub], () => {
set('🔧 repairing the breaking change…', '', 'no rollback. no pinning.');
scene.classList.remove('run');
scene.classList.add('fix');
}, 3300);
await show([main, sub], () => set('✓ breaking change repaired', 'ok',
'the Captain tries 1.5.0 again…'), 1800);
scene.classList.remove('fix');
scene.classList.add('win');
await sleep(2400);
await show([main, sub], () => set('💥 breaking change fixed', 'ok',
'the update stays. the bug doesn\u2019t.'), 3500);
}

(async () => { for (;;) await captain(); })();
</script>
</body>
</html>
26 changes: 26 additions & 0 deletions dashboard/cells/frank/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Cell prompt — Frank Garcia

> A short looping cartoon about dependency updates, starring Captain
> Semver, an original parody superhero (not a real Marvel character) whose
> round shield is a semver caret `^`. A small line reads
> `$ bump shield 1.4.2 → 1.5.0` and he says "It's a minor bump. I trust the
> version number!". He throws the shield at a brick wall labelled
> "your build"; it bounces back, hits him and knocks him over
> (little stars). Then, in amber: "✗ the minor bump was a breaking change —
> the shield came back. so did the bug.".
> Before the moral, the breaking change gets repaired in the same
> animation: a small "auto-repair" bot rolls in with a wrench, tightens the
> cracked shield (green sparks), the crack disappears, the shield flies
> back to the Captain's hand and he gets back up. Text: "🔧 repairing the
> breaking change… — no rollback. no pinning." then "✓ breaking change
> repaired — the Captain tries 1.5.0 again…". He throws the shield a second
> time: now it smashes through the wall (bricks fly, the wall crumbles), the
> shield returns and he hops. Text: "💥 breaking change fixed — the update stays. the bug
> doesn't." Then it loops. No "semantic versioning" moral. Minimal and typographic like Martin's
> quote cycler: slow fades, never more than two lines of text. Simple
> inline SVG with CSS animations, theme colours only. The footer counts the
> shields bounced back and links to my KTH profile. Green-on-black,
> matching the dashboard theme.
>
> A fixed caption above the footer explains the topic: "My research:
> automatically repairing code broken by dependency updates."
2 changes: 1 addition & 1 deletion dashboard/cells/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"id": "frank",
"name": "Frank Garcia",
"role": "PhD",
"cell": false,
"cell": true,
"image": "/img/people/frankrg.jpeg"
},
{
Expand Down
Loading