Skip to content

feat(themes): add a settings card to the bedroom theme and keep dusk through a room re-send - #17528

Merged
melodic-automation-lanes[bot] merged 12 commits into
mainfrom
feat/bedroom-settings-card
Nov 20, 2026
Merged

melodic-automation-lanes[bot] merged 12 commits into
mainfrom
feat/bedroom-settings-card

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

No related issue: an owner request ahead of a demo, a settings menu so a person need not know the /bedroom words, and the fixes from his hand test of the card.

Summary

/bedroom alone, in the desktop app, places a five-row settings card in the conversation: the theme on or off, reset, calibrate and Close; a button per switch showing its state; dim, glass and blur steps side by side; and the four title fields two to a row. A switch's button is inactive until its change has had time to finish; clicks in the room are never held back. A dim step now darkens a veil over the backdrop and sends no room, so the shader keeps running through it. A title change still sends the room, and with the ceiling light off the wait shows the room as it stands, not the lit room. Every typed command works as before; the card's buttons run the same code. Away from the desktop app the answer stays text.

Fix

  • plugins/themes/hooks/bedroom/register.tsx: the command.run body moves into bedroomCommand($, args). The command hook and every card button call it with the words a person would type, so a button and its command cannot drift and a press costs what the command costs.
  • Dim without a re-send. The Backdrop answer is now a Box holding the Shader (or the Svg alone) and a veil Box, absolutely placed over it, whose background is the room's night blue #07080f at dim's opacity (veilColor(), #rrggbbaa). The veil stays in the tree at every dim, clear at 0, so a dim step changes one color. Both drawings, the room under the shader and the room drawn whole, are built at dim 0, so a dim step no longer changes either and starts no hold. A saved dim applies from the first draw; /bedroom dim <n> and the card's steps share bedroomCommand.
  • Titles still re-send. A title is drawn into the room, so changing one sends the room, and the shader is taken away for seven seconds before it starts over the new room (the existing hold, kept at seven seconds: nothing shows a shorter wait is safe). In that wait the mod draws the room as it stands (wholeRoom()), hand-drawn dusk included, and a click in the wait is drawn into it; the shader then starts over the lit room as before and computes the dusk, seeded with the stored switch values on the same redraw. The hold is driven by $.clock.after, so the test kit can step it. The GLSL and lights.ts are unchanged.
  • In the room drawn without the shader, the console's title card shows only on the console's screen (scene/parts/tv.ts); the room under the shader keeps it on every screen (underShader in scene/lib.ts), so what the shader sees is unchanged.
  • A switch order (card, typed command, reset) moves the shader's number once, straight to the end (moves()), instead of to the middle and on 700 ms later. Only when the number already sits on the side asked for, because a click in the room turned the switch since, does it go to the middle first. Reset orders only the switches it changes.
  • The card is a Placed row ($.ui.place) drawn on the desktop surface only, with the band above the prompt as the fallback. Each /bedroom places a new row (bedroom-card-N). The status line is gone from the card (the buttons show state). A pressed switch's button is drawn dimColor with … after its state, and a press on it does nothing, for CHANGE_MS: the app's half second before the shader hears a number, the switch's change in the shader, and the console's two-second boot (0.8 to 1.1 s; 2.9 s for the console turning on), plus 0.7 s when its number had to turn back. The engine's Button has no disabled prop.
  • The card reads the module's settings at each draw and subscribes to one $.state value, themes.bedroom-card (declared in types/index.d.ts, named in plugin.json). Titles use the engine's Input; text typed and not yet set is kept per field across redraws.
  • /bedroom status answers what bare /bedroom answered before; bare /bedroom gives that answer and places the card's row without asking $.session.surfaces().
  • The /bedroom stats build name is settings-card-3. Saved state (bedroom:saved), the shader and the click behaviour while the shader runs are unchanged.
  • README sections for the card and for dim and titles, status row, .changes/themes/ fragment.

Verification

  • claude plugin test plugins/themes (2.1.328): 27 pass, 0 fail. New or changed in hooks/bedroom/card.test.tsx: the card is five rows, with theme, reset, calibrate and Close in the first, the six steps in one row and the title fields two to a row; a pressed switch draws tv: off… and dim, a second press is ignored, and it answers again exactly CHANGE_MS later (also the console's 2.9 s); a pressed switch moves the shader's tv value straight to 0, and a typed tv off when it already sits at 0 goes 0.5 then 0; a dim step from the card and a typed dim 30 keep the shader and its room and set the veil to #07080f1a and #07080f4d with no room sent; a title set from the card draws the whole dusk room alone (never the lit room) for 7000 ms and then the shader over the lit room; a saved dim of 0.2 gives a #07080f33 veil over a room drawn at dim 0 on the first draw; veilColor() at 0, 0.1, 0.8 and 1; a switch sends no room while the shader runs and a title sends it once; reset puts switches, dim and glass back, keeps titles and holds the switches it changed; calibrate asks for the dresser click; the theme button clears and sets the theme and says so. In register.test.tsx: moves(), aspectFrom(), and the console title card drawn only on the console's screen without the shader.
  • claude plugin validate plugins/themes (2.1.328): passed with warnings, the same TypeScript warning kinds as on main plus ICON_MISSING.
  • scripts/check-affected.sh: 17 passed, 3 skipped over 9 changed files.
  • The plugin-authoring secret scan found no key or token format; a grep of the diff for machine paths, user and host names found none.
  • Renders with the local headless-Chromium harness, light off: the shader over a room with dim 30 baked in, against the shader over the dim-0 room with a 30 % #07080f veil composited on top, differ by RMSE 0.008 (mean brightness 0.0535 and 0.0529). The veil also darkens the shader's own lamp, screen and lava light, which the baked-in dim did not; side by side the two read as the same room.
  • Engine behaviour at shader start, from the code and the engine's types, not yet seen in the app: the shader's light level is seeded from its first frame at step(0.5, asked), and the light's stored value of 0 arrives on the same redraw, so the shader itself never draws the lit room. The engine's types say nothing about what shows before a shader's first frame, so the remaining suspect for the lit flash after a title's hold is the lit input Svg shown alone while the shader starts. Because the app eases each value in from 0 at a start, switches stored on are drawn off for about half a second and then snap on.
  • Not run: the desktop app. Whether the backdrop Box fills the window, whether the veil paints over the Shader, whether a veil change keeps the shader running and whether room clicks pass through the veil are UNVERIFIED until an in-app capture. The test kit cannot raise ui.pointer, so a click during the wait is not covered by a test; the calibration math is tested as aspectFrom(). Whether the card fits without scrolling at the owner's window is judged from his screenshot (390 px showed five button rows), not measured.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 19, 2026 16:05
/bedroom alone, in the desktop app, now places a card in the conversation:
a button per switch showing its state, steps for dim, glass and blur, a
text field per title, and reset, calibrate and theme on or off. Every
press runs the same command body the typed /bedroom runs, so a button and
its command cannot drift, and the card redraws from a session state value
so a click in the room shows on it without redrawing the room. Away from
the desktop the answer stays text. /bedroom status keeps the old bare
answer reachable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The click hook now fires the card refresh without waiting on it, as it
does its store write, so a failed state write cannot fail a click. A
press whose answer is the status line already on the card shows no
second copy. The README states the press cost as the tests show it, and
the card test is typed against the kit's Engine and command input.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 21:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T23:39:17.704298Z 7a8295b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23904f8160

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The minute tick and every card press redraw the settings card, and each
title field was drawn from the saved title alone, so text typed and not
yet set was lost. Each title now keeps a draft from onInput, read before
the saved title; /bedroom title clears it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: d989193684

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on d989193684d66b8f29c22ad36d9f2a031224be04; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 7a8295bf41394401f02e97ef7d95dba04a28cb1b: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Code review: bedroom settings card (#17528), incremental from 49554be to 7a8295b

No blocking findings. This lane already reviewed earlier heads, so this review reports blocking findings only and leaves advisory ones out.

Scope. I read every hunk of the 4 files in .claude-lane/incremental.diff: the changelog fragment, plugins/themes/README.md, card.test.tsx and register.tsx. For context I also read three parts of register.tsx at head: the Backdrop render hook, the ui.pointer hook, and the dim/title branches of bedroomCommand. I checked where dim is used in scene.ts and scene/compose.ts.

What I checked

  • Dim no longer drops the shader. Both shaderRoom() and wholeRoom() now call bedroomSvg(..., 0). That means a dim step leaves lit === shaderSource, so dropShader() does not run and roomSends does not grow. The rewritten test pins this: it asserts the send count is the same after a card dim-up and after a typed dim 30.
  • The veil.
    • It is always present, at veilColor(saved.dim), inside the shader branch and the no-shader branch alike.
    • It has the same color (#07080f) and the same opacity mapping as the SVG veil it replaces in scene/compose.ts.
    • The clamping in veilColor and the hex padding are correct for 0, 0.1, 0.8 and 1. A test pins each value.
  • Titles. A title change still alters shaderRoom(). So the hold of SETTLE_MS - 1 and then the shader starting again still apply, now at dim 0 with the veil kept. The test covers this.
  • Saved dim at session start. The new test checks that a stored dim: 0.2 is applied to the veil on the first draw.

Not verifiable here. The engine's type declarations are not in this checkout. So I could not confirm two things:

  • that the absolute-positioned veil Box lets clicks through to the interactive Svg. The ui.pointer hook reads scene-level e.x/e.y, which suggests the engine raises the event whatever is on top.
  • that the Svg still fills the new Box wrapper.

The PR says the desktop app was not run, so neither point has been checked on the real surface.

Verification. The test results in the PR body are the author's claim and I did not confirm them. I had no shell and ran no tests.

Settled and prior items. The earlier said thread is resolved and fixed, and this push does not touch the types or AbovePrompt threads. I raised none of them again.

Closing issue. None: the PR answers an owner request, so there are no acceptance criteria to check.

Spend. None new.

Loosened checks. The rewritten card test replaces the old dim assertions, which expected a whole-room send at the new dim, with assertions for the new intended behavior:

  • the shader keeps running;
  • the veil color changes;
  • the room-send count is unchanged.

No test is skipped and no assertion is weakened against unchanged behavior, so I judged this not a loosening.

Loosened-check verdict: fail (the default, because the prompt has no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The prompt also has no loosened_check_decision_record: line, so I did not check the citation requirement.

Advisory and manifest lines (1)
  • manifest version: pass. The changelog fragment still declares bump: minor; this push changes only its Fixed entry.

Verifier dropped 0 of 0 candidates.

A typed command or a room click refreshed the card with no answer, and
the last press's answer stayed, so the card could read "the theme is
cleared" beside "theme: on". A refresh with no answer now clears it.
The command description says the card is the desktop app's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-security-review: 1 inline finding(s) on d989193684d66b8f29c22ad36d9f2a031224be04; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 7a8295bf41394401f02e97ef7d95dba04a28cb1b: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17528, incremental since 49554be796

No security issues found. I read every hunk of the 4 files in the incremental diff. This lane has already reviewed earlier heads of this pull request, so I reported only blocking findings, and there are none.

What changed in this push:

  • plugins/themes/hooks/bedroom/register.tsx:
    • Dim is now a veil Box, absolutely placed over the room, coloured by the new veilColor(dim).
    • Both room drawings (shaderRoom() and wholeRoom()) are built at dim 0, so a dim step no longer re-sends the room.
    • The Backdrop answer is wrapped in a container Box.
    • The build name is now settings-card-3.
  • card.test.tsx: new and updated tests for the veil, plus a stored parameter for the mock store.get.
  • README and changelog fragment: prose only.

Trust-boundary check:

  • veilColor(): it clamps saved.dim to [0, 1] and formats it as a hex alpha byte, then appends that to a fixed #07080f. The value only sets a backgroundColor prop on a UI Box. It reaches no shell, path, URL, markup string or network call.
  • Room drawings: they now pass a constant 0 for dim. Title handling and SVG escaping are unchanged.
  • Not added: no credential, token, store key or code that sends data off the machine.
  • Controls: no file in this push matches a trusted-path glob. The push touches no trust control, merge hold, workflow, manifest or instruction surface.

Other notes:

  • Settled threads: none re-raised. The plugin.json types flag is still settled: the owner stated a decision and its lines are unchanged.
  • Embedded text: the PR context and settled-threads files hold no directives aimed at this lane.
  • Spend: none.
Manifest lines (1)
  • manifest types: settled by kyle-sexton, plugins/themes/.claude-plugin/plugin.json, lines 10-10 at the head

critical-findings: 0

In the desktop app, bare /bedroom answered the status line and opened no
card, because $.session.surfaces() listed no desktop at that moment. It
now always places the row; the Placed and AbovePrompt hooks draw the
card only on the desktop surface, so other surfaces keep the text answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 2e19d81cb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kyle-sexton and others added 3 commits November 19, 2026 17:35
… card

With the ceiling light off, a dim step or a title change showed the lit
room for seven seconds: after a re-send the mod drew the shader's lit
input alone until the shader came back. The room shown in that wait is
now the room as it stands, hand-drawn dusk included, and a click in it is
drawn; the shader still restarts after seven seconds, as before. The
console's title card shows only on the console's screen in that room.

The settings card is five rows (actions, switches, dim/glass/blur, the
titles two to a row), and a switch's button is inactive, dim with an
ellipsis, until its change has had time to finish. A switch order moves
the shader's number once unless a click in the room turned it since.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton changed the title feat(themes): add a settings card to the bedroom theme feat(themes): add a settings card to the bedroom theme and keep dusk through a room re-send Nov 19, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49554be796

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kyle-sexton and others added 4 commits November 19, 2026 18:16
… room

A dim step drew the room again with its veil baked in, so the shader
had to stop for the 7-second hold and start over it, and the room
flashed lit on the way back. The veil is now a Box over the Shader in
the backdrop, so a dim step changes one colour and the room and shader
stay as they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 7a8295bf41

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The unattended merge path enqueued this pull request at head 7a8295bf41394401f02e97ef7d95dba04a28cb1b.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 71ccd29 Nov 20, 2026
130 of 134 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the feat/bedroom-settings-card branch November 20, 2026 02:06
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The post-merge check verified merge commit 71ccd29ba6f31c6d0aa7802cf9bb6d8e7af160de; later checks count it verified from this comment.

@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 0%; mutation score 0%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/themes/hooks/bedroom/scene/parts/tv.ts 0 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/themes/hooks/bedroom/scene/parts/tv.ts:449 other productive input-gap

The run's summary has the full report.

kyle-sexton added a commit that referenced this pull request Nov 20, 2026
…evision that reacts to Claude and sound (#17675)

No related issue: the next step for the bedroom theme after #17497 and
#17528.

## Summary

The bedroom theme gains time of day, weather, a hallway outside the
door, a television that reacts to Claude working, and sound (off by
default). The settings card gains controls for them.

Draft on purpose: the owner is hand-testing this build in the desktop
app, and more fixes to the sound and the outdoor art follow on this
branch before it is marked ready.

## Fix

- Time of day: the room follows the local clock (`/bedroom time auto`),
or holds one of eight named hours. The view outside the window keeps the
dusk scene's shapes at every hour, with a moon and stars at night.
- Weather: clear, overcast, rain, downpour and storm in the window, each
a different weight; `auto` changes every three hours and never picks a
storm. `/bedroom weather strike` forces one lightning pulse in a storm.
- Hallway: a passer-by's shadow crosses the door's gap now and then, and
a hall light comes on some evenings. `/bedroom hall pass` and `/bedroom
hall light` trigger them.
- The television dims and flickers slightly while a turn runs (`/bedroom
signal`).
- Sound, off by default (`/bedroom sound on`): cicadas in dry weather
from dusk through night, rain, downpour and storm beds, thunder, and the
television's switch. One looping player per bed that stops at once; a
volume setting; two recordings per kind to choose between. Each
recording's source and licence statement is in
`plugins/themes/sounds/bedroom/SOURCES.md`.
- The wall switch's lever shows the ceiling light's state.
- The shader's dusk reads more of the furniture in shadow, and the desk
lamp lights part of the desk.
- The card: six rows, the time row in order through the day, a `titles`
toggle for the title fields, volume steps, and no shader button.
- The code moves under `hooks/bedroom/core` and `hooks/bedroom/pieces`.
`lights.ts` is generated and excluded from the size check.
- Settings saved by 0.2.1 under `bedroom:saved` load unchanged.

## Verification

- `claude plugin test plugins/themes`: 88 pass, 0 fail.
- `claude plugin validate plugins/themes`: passes with warnings; shader
cost 2.25 ms a frame and 2.49 ms the first frame.
- `scripts/check-affected.sh`: 17 passed, 3 skipped.
- Hand-tested by the owner in the desktop app on this head: time of day,
the hallway triggers, the wall switch, evening and night, and the
default cicadas accepted.
- Known and still open on this branch: the daytime trees read as flat;
the downpour and storm beds sound too close; one-shot sounds play late;
the titles row overflows the card's width; no card buttons yet for the
three triggers; thunder does not yet follow a forced strike.

## Related

- #17497
- #17528
- #17575
- #17509

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant