diff --git a/frontend/style.css b/frontend/style.css index 26c77dd..771be58 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -214,6 +214,13 @@ body { position: relative; } +.tile-body pre { + position: absolute; + bottom: 0; + left: 0; + right: 0; +} + .tile-pre { position: absolute; inset: 0; diff --git a/frontend/tests/test_app.mjs b/frontend/tests/test_app.mjs index 73412d9..4bb8c06 100644 --- a/frontend/tests/test_app.mjs +++ b/frontend/tests/test_app.mjs @@ -416,6 +416,16 @@ test('buildTileHTML adds tier class on mobile', () => { assert.ok(html.includes('session-tile--tier-'), 'should contain tier class on mobile'); }); +test('buildTileHTML wraps snapshot in .tile-body with
 as direct child', () => {
+  const session = { name: 'my-session', snapshot: 'line1\nline2' };
+  const html = app.buildTileHTML(session, 0, false);
+  assert.ok(html.includes('class="tile-body"'), 'should contain .tile-body wrapper');
+  assert.ok(
+    /
/.test(html),
+    '
 should be a direct child of .tile-body',
+  );
+});
+
 // --- renderGrid ---
 
 test('renderGrid clears grid and shows empty-state when sessions array is empty', () => {