From 7c8612ec069aec4d2776f1f0b8116a5cb555cf65 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 08:02:24 +0000 Subject: [PATCH 1/3] Raise the view title and period in phone full screen Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MCuMSjSBeaovndtjLd67kn --- site/account.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site/account.css b/site/account.css index 0c97cf93..6b96b30b 100644 --- a/site/account.css +++ b/site/account.css @@ -963,3 +963,10 @@ body.globe:has(.g-shelf:not([hidden])) #ai-live.low { bottom: 238px; } .pub-top { display: flex; align-items: center; gap: 6px; margin: -4px -6px 2px; } .pub-top h2 { flex: 1; margin: 0; } .pub-top .ibtn { width: 30px; height: 30px; flex: none; } +/* Full screen on a phone: the search and the menu button have gone, so the title of the view and the period move + up into the room they leave, under the notch (asked for, Nov 2026). They step back down while the top peeks in. */ +@media (max-width: 699px) { + #road-views, #road-head { transition: top .3s; } + body.fullscreen:not(.peek) #road-views { top: calc(14px + env(safe-area-inset-top)); } + body.fullscreen:not(.peek):not(.multi) #road-head { top: calc(10px + env(safe-area-inset-top)); } +} From 63c144ccb865b25c81c8b2641f4d17b792043d2d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 08:05:11 +0000 Subject: [PATCH 2/3] Smaller period on a phone; leaving the page pauses play and wakes the sound on return Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MCuMSjSBeaovndtjLd67kn --- site/app.js | 9 +++++++-- site/styles.css | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/site/app.js b/site/app.js index 16fcda32..1d8492ce 100644 --- a/site/app.js +++ b/site/app.js @@ -2530,7 +2530,8 @@ import { NEAR, GONE, FAR, FINE, calMarks, dayText, sizeAt, warp, focalYears, tra try { const AC = window.AudioContext || window.webkitAudioContext; if (!sound.ctx && AC) sound.ctx = new AC(); - if (sound.ctx && sound.ctx.state === 'suspended') sound.ctx.resume(); + // A phone puts the sound to sleep when the page is left ('suspended', or Safari's 'interrupted'); wake it. + if (sound.ctx && sound.ctx.state !== 'running' && sound.ctx.state !== 'closed') sound.ctx.resume().catch(() => {}); } catch { sound.ctx = null; } } // One breath of air: noise through a filter that closes as the sound settles, so it starts soft, sinks and @@ -2725,7 +2726,11 @@ import { NEAR, GONE, FAR, FINE, calMarks, dayText, sizeAt, warp, focalYears, tra drawSubs(); tune(); } // The road rests while the tab is hidden, so the music does too. + // Leaving the page pauses play (reported on a phone, Nov 2026: back on the page, play did not move at all). A phone + // stops the sound while the page is away, so a line being said never ends and play would wait on it for good; + // paused, the line is held where it was and play goes on from there when it is pressed again. document.addEventListener('visibilitychange', () => { + if (document.hidden && play.on) pausePlay(); if (!music.el) return; if (document.hidden) music.el.pause(); else if (music.want) { const p = music.el.play(); if (p && p.catch) p.catch(() => {}); } }); @@ -3324,7 +3329,7 @@ import { NEAR, GONE, FAR, FINE, calMarks, dayText, sizeAt, warp, focalYears, tra about: (e) => { const c = catById.get(e.category), w = places[e.id]; return { kind: c?.name || e.category || '', type: c?.domain || e.domain || '', where: !e.where && w ? [w[0], w[1]] : null }; }, first: () => { const p = (road.gorder || [])[0]; return p ? stepOf(p) : null; }, voiceLoad: () => (told.load != null && told.load < 1 ? { part: told.load, mb: Math.round((told.bytes || 0) / 1e6) || MODEL_MB } : null), - audio: () => { try { const AC = window.AudioContext || window.webkitAudioContext; if (!sound.ctx && AC) sound.ctx = new AC(); if (sound.ctx?.state === 'suspended') sound.ctx.resume(); } catch { sound.ctx = null; } return sound.ctx; }, + audio: () => { try { const AC = window.AudioContext || window.webkitAudioContext; if (!sound.ctx && AC) sound.ctx = new AC(); if (sound.ctx && sound.ctx.state !== 'running' && sound.ctx.state !== 'closed') sound.ctx.resume().catch(() => {}); } catch { sound.ctx = null; } return sound.ctx; }, told: () => { const seen = new Set(); return { entries: (road.gorder || []).filter((p) => !seen.has(p.t.id) && seen.add(p.t.id)).map((p) => ({ id: p.t.id, name: p.t.name, when: spanOf(p.t), mark: stepOf(p).mark || '', summary: p.t.summary || '' })) }; }, redraw: () => { if (state.views.length) changed(); }, detailChars: () => boot.detail.chars, }); diff --git a/site/styles.css b/site/styles.css index 472c2e14..abf6ad78 100644 --- a/site/styles.css +++ b/site/styles.css @@ -447,7 +447,7 @@ small > .ctag, small .ctag { margin-left: 0; } #road.short .rc.full .rs, #road.short .rc.full img { display: none; } @media (max-width: 699px) { #road-head { right: 14px; top: 104px; gap: 4px; max-width: 50%; } - #road-year { font-size: 34px; } + #road-year { font-size: 26px; } #road-views { top: 58px; max-width: calc(100% - 28px); gap: 4px 16px; } .rv b, #road-views[data-n="2"] .rv b { font-size: 18px; } #road-views:not([data-n="1"]):not([data-n="2"]) .rv b { font-size: 14px; } From 44a18934f502595b2d141425a3a1a5a339943372 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Nov 2026 08:11:28 +0000 Subject: [PATCH 3/3] Phone: smaller title and period, glass card; restart frames and remake a lost map on return Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MCuMSjSBeaovndtjLd67kn --- site/app.js | 8 ++++++++ site/globe.js | 22 ++++++++++++++++++++++ site/styles.css | 10 ++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/site/app.js b/site/app.js index 1d8492ce..3fe1abfe 100644 --- a/site/app.js +++ b/site/app.js @@ -2731,6 +2731,14 @@ import { NEAR, GONE, FAR, FINE, calMarks, dayText, sizeAt, warp, focalYears, tra // paused, the line is held where it was and play goes on from there when it is pressed again. document.addEventListener('visibilitychange', () => { if (document.hidden && play.on) pausePlay(); + // Back on the page: a frame asked for while it was away may never come (the picture then stood frozen while the + // sound went on), so the road and the globes start their frames again. + if (!document.hidden) { + if (road.raf) { cancelAnimationFrame(road.raf); road.raf = 0; road.live = false; } + if (globe) globe.wake(); + for (const pn of panes.values()) pn.g.wake(); + roadKick(); + } if (!music.el) return; if (document.hidden) music.el.pause(); else if (music.want) { const p = music.el.play(); if (p && p.catch) p.catch(() => {}); } }); diff --git a/site/globe.js b/site/globe.js index 9a1d23eb..eea4de26 100644 --- a/site/globe.js +++ b/site/globe.js @@ -233,6 +233,11 @@ export function createGlobe(host, { open, goTo, seek, credit, esc, calm, pane, c map.touchZoomRotate.disableRotation(); // The credits the map's licences ask for are folded behind their small button (asked for, Nov 2026: no line of text on the map). map.on('idle', () => { host.dataset.idle = '1'; }); map.on('dataloading', () => { host.dataset.idle = '0'; }); + // A phone can take the map's drawing away while the page is left (reported, Nov 2026: back on the page, the sound + // played and the picture stood frozen). If it does not come back by itself, the map is made again. + let lost = 0; + map.on('webglcontextlost', () => { lost = setTimeout(() => { if (S.map === map && !document.hidden) remake(); }, 1500); }); + map.on('webglcontextrestored', () => { clearTimeout(lost); lost = 0; }); map.on('load', () => { map.addSource('arc', { type: 'geojson', data: { type: 'FeatureCollection', features: [] } }); const kind = (k) => ['==', ['get', 'k'], k]; @@ -662,6 +667,16 @@ export function createGlobe(host, { open, goTo, seek, credit, esc, calm, pane, c // A drag turns the globe; it must not also carry the reader through time, which the stage under it does. for (const ev of ['pointerdown', 'pointermove', 'pointerup']) box.addEventListener(ev, (e) => e.stopPropagation()); + function remake() { + const m = S.map; S.map = null; S.asked = false; S.said = null; + try { m.remove(); } catch (e) { /* gone already */ } + needMap(); run(); + } + function lostGl() { + const c = S.map && S.map.getCanvas(); + const gl = c && (c.getContext('webgl2') || c.getContext('webgl')); + return !!gl && gl.isContextLost(); + } function needMap() { if (S.bare || S.map || S.asked || !S.steps.some((s) => s.place)) return; S.asked = true; note.hidden = true; @@ -723,6 +738,13 @@ export function createGlobe(host, { open, goTo, seek, credit, esc, calm, pane, c if (!shelf.hidden) measure(); cams(); place(); run(); }, + // Back on the page: a frame asked for while it was away may never come, and the map may have lost its drawing. + wake() { + if (S.gone) return; + if (S.raf > 0) { K.caf(S.raf); S.raf = 0; } + if (lostGl()) remake(); else if (S.map) S.map.triggerRepaint(); + this.resize(); + }, stage: () => S.stage, // 'globe' (the map where entries have places) or 'full' (the stars for every entry). Kept in this browser. mode(v) { diff --git a/site/styles.css b/site/styles.css index abf6ad78..a4831012 100644 --- a/site/styles.css +++ b/site/styles.css @@ -447,9 +447,9 @@ small > .ctag, small .ctag { margin-left: 0; } #road.short .rc.full .rs, #road.short .rc.full img { display: none; } @media (max-width: 699px) { #road-head { right: 14px; top: 104px; gap: 4px; max-width: 50%; } - #road-year { font-size: 26px; } + #road-year { font-size: 21px; } #road-views { top: 58px; max-width: calc(100% - 28px); gap: 4px 16px; } - .rv b, #road-views[data-n="2"] .rv b { font-size: 18px; } + .rv b, #road-views[data-n="2"] .rv b { font-size: 15px; } #road-views:not([data-n="1"]):not([data-n="2"]) .rv b { font-size: 14px; } #road-views.bare .rch { display: none; } .rch { font-size: 10.5px; line-height: 1.25; } @@ -984,3 +984,9 @@ body.exploring #subs, body.creating #subs, body.editing #subs { display: none; } } @media (max-width: 699px) { [data-theme="light"] #globe .g-card.bare { background: rgba(255, 255, 255, .25); } } [data-theme="light"] #globe .g-pane .g-card, [data-theme="light"] #globe[data-card] .g-pane .g-card { text-shadow: 0 0 2px #fff, 0 0 14px rgba(255, 255, 255, .9); } +/* On a phone the card is the same glass as on a wide screen (asked for, Nov 2026): see-through, blurred, with a pale + lit edge, not a dark box ringed in the view's colour. */ +@media (max-width: 699px) { + #globe .g-card, #globe .g-card.bare { background: rgba(10, 14, 22, .25); border-color: rgba(200, 215, 255, .16); box-shadow: 0 18px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06); border-radius: 6px; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); } + [data-theme="light"] #globe .g-card, [data-theme="light"] #globe .g-card.bare { background: rgba(255, 255, 255, .25); border-color: rgba(255, 255, 255, .6); box-shadow: 0 18px 50px rgba(40, 50, 80, .16), inset 0 1px 0 rgba(255, 255, 255, .7); text-shadow: none; } +}