-
Notifications
You must be signed in to change notification settings - Fork 0
Add Textual TUI for interactive alarm configuration #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- New sol_tui.py with Textual framework for flicker-free terminal UI - Dark background, arrow key navigation, animated sunrise preview - Press 'A' for animation, Enter to start alarm in new Terminal - Integrates with existing main.py (runs TUI when no command given) - Added textual>=3.0.0 dependency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove AppleScript that opened new terminal - Use os.execvp to replace process with caffeinate + sunrise command - Properly change to lamp directory before running - Stays in same terminal window for cleaner UX Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Press Enter now shows sunrise animation first - Lamp turns off, animation plays - After animation dismisses, runs actual sunrise command Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add profile selection at top (standard/quick/gentle/custom) - Wake time now uses 10 min increments - Duration now uses 5 min increments (10-60 min range) - Double-escape required to exit animation screen - Switching profile applies its preset duration/temp - Manual adjustment auto-switches to custom profile Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change "Good Morning, welcome to the game!" to "Welcome to the game." - Use proper box-drawing characters for clean consistent border - Darker sky background for better contrast Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 'A' key: plays animation, auto-returns to main menu after 1s - Enter key: plays animation, waits for dismiss, then starts alarm - Added auto_return parameter to AnimationScreen Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| "wake_time": self._pending_wake_time, | ||
| "profile": self._pending_profile, | ||
| } | ||
| self.exit(self.app_result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End Temperature setting in TUI has no effect
Medium Severity
The TUI presents a fully interactive "End Temp" configuration field (4000K-6500K) that users can navigate and adjust, but the selected value is never used. In _on_animation_complete, only wake_time and profile are passed to the result dictionary. The run_tui function then executes main.py up with only these two parameters. Since main.py has no CLI argument for end temperature (it uses hard-coded temperature phases within each profile), the user's End Temp selection has zero effect on the actual alarm.
Summary
solis called with no argumentsFeatures
Test plan
uv run python main.pywith no args - should show TUI🤖 Generated with Claude Code
Note
Introduces an interactive terminal UI for configuring and starting sunrise alarms, and makes it the default experience when running without arguments.
sol_tui.pyTextual app with profile selection, wake time, duration, end temperature, sunrise animation, lamp connection status, and keybindings (↑/↓/←/→,Enter,A,Q,Esc×2)main.py: if nocommandis provided, runrun_tui()(Textual TUI) instead of printing helptextualdependency inpyproject.tomland lockfile updatessol-ink/optional Ink/Bun TUI (React/Ink components, launcher script, TypeScript config) as an alternative terminal UIWritten by Cursor Bugbot for commit dda07f6. This will update automatically on new commits. Configure here.