Repository navigation
feat(ui): timer duration editor - #242
Merged
Merged
Conversation
Re-click on an active night/turbo chip opens a centred duration editor (hours + minutes) below the countdown line, mirroring the preset-chip pattern. Includes the firmware-behaviour probe result that single-write 0x0302/0x0303 restarts the running countdown by itself — so the server-side handler is one ParamWrite. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Eight-task plan with TDD steps, exact file refs, and code blocks. Tasks 0-1 are server-side (ops + handler); 2-5 are templ/CSS (signals, click-expr, editor component, styling); 6 is Playwright; 7 is pre-push gates + live verification on breezy.wg. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Six scenarios: first-click activates, re-click opens editor, editing posts new duration body, third-click closes editor, preset/power-off cascade closes editor, and night→turbo switch closes night editor. Adds withDuration(name, mode, hours, minutes) fixture helper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
hughobrien
enabled auto-merge (squash)
May 14, 2026 15:05
hughobrien
added a commit
that referenced
this pull request
Jun 29, 2026
* docs: timer-duration editor design
Re-click on an active night/turbo chip opens a centred duration
editor (hours + minutes) below the countdown line, mirroring the
preset-chip pattern. Includes the firmware-behaviour probe result
that single-write 0x0302/0x0303 restarts the running countdown by
itself — so the server-side handler is one ParamWrite.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs: timer-duration editor implementation plan
Eight-task plan with TDD steps, exact file refs, and code blocks.
Tasks 0-1 are server-side (ops + handler); 2-5 are templ/CSS
(signals, click-expr, editor component, styling); 6 is Playwright;
7 is pre-push gates + live verification on breezy.wg.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(breezy): SetTimerDuration op for night/turbo (0x0302/0x0303)
* feat(ui): POST /ui/devices/{name}/timer-duration handler
* feat(ui): seed $durationEditor + $_durationEdit signals
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(ui): timer chip re-click toggles duration editor
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style: gofmt alignment in render_test.go
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(ui): timer duration editor component + change-handler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(ui): timer-duration-editor centred-row CSS
* test(ui): playwright coverage for timer duration editor
Six scenarios: first-click activates, re-click opens editor, editing
posts new duration body, third-click closes editor, preset/power-off
cascade closes editor, and night→turbo switch closes night editor.
Adds withDuration(name, mode, hours, minutes) fixture helper.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-clicking an active night/turbo timer chip now opens a centred two-input duration editor (hours + minutes) below the countdown line — mirroring the preset-chip pattern. The chip itself no longer has an in-chip deactivate gesture; users stop a timer via any speed chip (preset/manual) or power-off, both of which already clear
$specialModevia the existing cascades.Editing the duration writes param
0x0302(night) or0x0303(turbo). Verified against the office unit at firmware 0.11 during design: a single duration write while the timer is active restarts the running countdown on its own, so the handler is oneWriteParamscall — no follow-up0x0007re-arm needed.breezy.SetTimerDuration(ctx, c, mode, hours, minutes)inpkg/breezy/ops.go+ unit testsPOST /ui/devices/{name}/timer-duration(validated; SSE error envelope)$durationEditorand$_durationEdit(NOT inCardSignals— they survive across SSE pushes)data-effecton.ctrl-group-timercloses a stale editor when$durationEditorand$specialModediverge — catches cascade-driven deactivation, power-off, scheduler, and server-pushed mode change with one ruleDesign:
docs/superpowers/specs/2026-05-14-timer-duration-editor-design.mdPlan:
docs/superpowers/plans/2026-05-14-timer-duration-editor.mdTest plan
go test ./pkg/breezy/ -run TestOps_SetTimerDuration -v— happy path + range/mode rejectiongo test ./cmd/breezyd/ -run 'TestUIWriteTimerDuration|TestUIWriteAction_NotFound' -v— handler happy + each validation path + 404go test ./cmd/breezyd/ui/templates/ -run 'TestTimerClickExpr|TestTimerGroupCloseEditorEffect|TestTimerDurationEditor|TestInitialCardSignals' -v— click-expr branches, closure rule, change-expr substrings, signal seedingjust test-templ-drift— generated*_templ.goin syncjust test-ui— 34/34 Playwright tests, including 6 new timer-duration scenarios (open via re-click, edit posts + countdown snaps, third-click closes, preset/power-off/mode-switch cascades close editor)golangci-lint run ./...— 0 issuesgo test -race ./...— passed in the priorjust ciattempt🤖 Generated with Claude Code