Make the console survive locked files and private handles, and start with Activities off

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-05 11:38:59 -08:00
1 parent c52244bee1
commit 2cb174ecf0
17 files changed
+160 -69

No files matched your search

+11 -11
View File
@@ -3099,12 +3099,12 @@
scores</strong>, at the bottom of the window, clears them all after a
second click to confirm.
</p>
<h4>Hiding it</h4>
<h4>Showing and hiding it</h4>
<p>
Don't want the die? Untick <strong>Show Activities</strong> in User
Preferences (the gear) and it is gone from every screen. To play
without sound, untick <strong>Play game sounds</strong> beside it.
A game with music (turn on <strong>Play game music</strong> there) has
The die is off until you tick <strong>Show Activities</strong> in User
Preferences (the gear); untick it again and it is gone from every screen. To play
without sound, untick <strong>Play activity sounds</strong> beside it.
A game with music (turn on <strong>Play activity music</strong> there) has
its own <strong>Music</strong> slider under the board for how loud it plays.
</p>
<p>
@@ -3409,8 +3409,8 @@
<li>
<strong>Activities</strong>: <strong>Show Activities</strong> puts
the die in the top bar, which opens small games to play while you
wait. Untick it to hide the die on every screen.
<strong>Play game sounds</strong> turns the games' sounds on or
wait. It starts unticked; untick it again to hide the die on every screen.
<strong>Play activity sounds</strong> turns the games' sounds on or
off, leaving every other sound as it is; with Play sounds off, the
games are silent too.
</li>
@@ -3679,10 +3679,10 @@
</fieldset>
<fieldset data-section="activities" class="modal-ranges looks-activities">
<legend>Activities</legend>
<label><input type="checkbox" id="looks-activities" checked /> <span>Show Activities</span></label>
<label><input type="checkbox" id="looks-activity-sounds" checked /> <span>Play game sounds</span></label>
<label><input type="checkbox" id="looks-game-music" /> <span>Play game music</span></label>
<p class="help">The die in the top bar opens small games to play while you wait. Play game sounds turns the games' sounds on or off, and Play game music their music; Play sounds, above, silences them too.</p>
<label><input type="checkbox" id="looks-activities" /> <span>Show Activities</span></label>
<label><input type="checkbox" id="looks-activity-sounds" checked /> <span>Play activity sounds</span></label>
<label><input type="checkbox" id="looks-game-music" /> <span>Play activity music</span></label>
<p class="help">The die in the top bar opens small games to play while you wait. Play activity sounds turns the games' sounds on or off, and Play activity music their music; Play sounds, above, silences them too.</p>
</fieldset>
</section>
</div>
+2 -2
View File
@@ -31,11 +31,11 @@ export const DEFAULT_LOOKS = {
...soundPrefs(null),
width: DEFAULT_CARD_WIDTH,
hideUnavailable: true,
// Activities: the top bar's die, whether its games play sounds (under Play
// Activities: the top bar's die (hidden until someone turns on Show Activities), whether its games play sounds (under Play
// sounds, which silences them too), the game last picked, and one best score
// per listed game (activityBestSnake) or, for a game with courses, per
// course (activityBestGolfPirate), each a flat key for cleanLooks().
hideActivities: false,
hideActivities: true,
activitySounds: true,
// Whether a game plays its music too (chiptune or recorded songs): off until asked for.
gameMusic: false,
+3 -3
View File
@@ -22,7 +22,7 @@ import { hushMusic, music as playMusic } from "../music.js";
const $ = (id) => document.getElementById(id);
// Every sound the window and its games make goes through these two, so
// Preferences' Play game sounds silences them all (and Play sounds, which
// Preferences' Play activity sounds silences them all (and Play sounds, which
// tones.js checks, does too).
const tone = (...args) => {
if (looks.activitySounds) playTone(...args);
@@ -30,7 +30,7 @@ const tone = (...args) => {
const hum = (...args) => {
if (looks.activitySounds) playHum(...args);
};
// And the music, which also needs Play game music, at the game's own
// And the music, which also needs Play activity music, at the game's own
// music volume (the window's Music slider). A song's "playing" or "ended"
// goes back to the game, which moves on to its next song on "ended".
const musicFor = (entry) => (name, intensity, options) => {
@@ -38,7 +38,7 @@ const musicFor = (entry) => (name, intensity, options) => {
return undefined;
};
const MUSIC_TITLE = "This game's music volume";
const MUSIC_OFF_TITLE = "Turn on Play game music in User Preferences to hear it";
const MUSIC_OFF_TITLE = "Turn on Play activity music in User Preferences to hear it";
// Quiets every held sound and the music: the window stopped ticking a game.
function hushTones() {
+6 -1
View File
@@ -391,7 +391,12 @@ export function renderCard(item) {
const skip = el("button", "btn tiny", skipped ? "Do not skip" : "Skip this one");
skip.type = "button";
skip.style.marginTop = "16px";
skip.addEventListener("click", () => (skipped ? stage(item.id, null) : skipAndMoveOn(item.id)));
skip.addEventListener("click", () => {
if (!skipped) return skipAndMoveOn(item.id);
// Keep a note typed with the skip: the box still shows it, so the send must carry it.
const kept = page.local.staged[item.id];
stage(item.id, kept && kept.text ? { type: "answer", kind: item.kind, text: kept.text } : null);
});
card.appendChild(skip);
if (page.local.skipFlash === item.id) {
card.classList.add("is-skip-flash");
+3 -3
View File
@@ -625,7 +625,7 @@ async function copyHandoffText(text, id, label) {
// CLI reads the stored skill and spec, marks the handoff used and falls back
// to Quick Task if either is gone.
async function pickUpHandoff(h) {
if (page.gone || page.pendingResult || page.local.launching || finish()) return;
if (page.gone || page.pendingResult || page.local.launching || page.launchScoping || finish()) return;
page.launchScoping = true;
await hooks.syncWorkspaceScope(h.spec || "");
try {
@@ -1091,7 +1091,7 @@ export function renderConfirm(main, entry) {
// marks the action as being about the session, and it reaches the agent
// through the same wait loop. The dashboard reads `skill` off it.
export async function launchSkill(entry) {
if (page.gone || page.pendingResult || page.local.launching || finish()) return;
if (page.gone || page.pendingResult || page.local.launching || page.launchScoping || finish()) return;
const target = launchTarget(entry, selSpec());
// The card was clickable, so this should never fire — but a spec picked in
// one tab could have shifted the ground under a stale render in another.
@@ -1351,7 +1351,7 @@ export function wireDashboard() {
$("delete-name").addEventListener("keydown", (e) => {
if (e.key === "Enter") {
e.preventDefault();
deleteStep();
if (!$("delete-go").disabled) deleteStep();
}
});
// `close` is queued, so it can land after the dialog was opened again for
+1 -1
View File
@@ -899,7 +899,7 @@ export function renderStopping() {
extra.replaceChildren();
if (stuck) {
extra.appendChild(
el(
textWithCode(
"p",
"stop-note",
page.inApp
+2 -1
View File
@@ -101,7 +101,8 @@ function posePane(main, cls, workflow) {
const pane = el("div", cls);
pane.dataset.pose = pose;
pane.appendChild(startStage(workflow));
if (held) main.insertBefore(pane, held);
// The old pane (another pose) is replaced, not left beside the new one.
if (held && held.parentNode === main) held.replaceWith(pane);
else main.appendChild(pane);
return pane;
}