Skip to content

Sharpen the sun's halo rule: white in-app, amber only outside#260

Merged
johannesjo merged 4 commits into
mainfrom
claude/sun-halo-detection-szirih
Jul 25, 2026
Merged

Sharpen the sun's halo rule: white in-app, amber only outside#260
johannesjo merged 4 commits into
mainfrom
claude/sun-halo-detection-szirih

Conversation

@johannesjo

Copy link
Copy Markdown
Owner

The sun wore an amber halo in two places: the resting dashboard companion
and the departing hand-off. Only one of those had a reason.

Sharpen it to one rule - the sun's body may be warm, but the light it
casts is white. Amber is not a day/night signal and not a role badge; it
belongs to the sun as it lives outside our own surfaces, where it has
to announce itself over content we don't control (the Little Sun overlay,
the home-screen widgets). The departing hand-off still warms, because it
is becoming that Little Sun - the warming is the hand-off, not a state.

So the companion settle drops warmth: 1. It still reads sunlit through
its warm disc rim (--minded-sun-face-edge), and it keeps the snug reach,
which is about the bottom-edge clip (#106), not colour. The upshot is
that the everyday lift off the bottom bar into an intervention is now a
pure size and position morph rather than doubling as a colour change -
one sun, one light.

The cool half of the glow axis is untouched (the up-drag let-go read),
and the moon never warmed anyway.

Rule written down in CLAUDE.md and as a block comment atop sunSettle.ts,
with tests guarding every in-app settle against amber creeping back.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KvG5EVDfN7tVKWwatiMAUj

claude added 4 commits July 25, 2026 16:03
The sun wore an amber halo in two places: the resting dashboard companion
and the departing hand-off. Only one of those had a reason.

Sharpen it to one rule - the sun's body may be warm, but the light it
casts is white. Amber is not a day/night signal and not a role badge; it
belongs to the sun as it lives *outside* our own surfaces, where it has
to announce itself over content we don't control (the Little Sun overlay,
the home-screen widgets). The departing hand-off still warms, because it
is becoming that Little Sun - the warming is the hand-off, not a state.

So the companion settle drops `warmth: 1`. It still reads sunlit through
its warm disc rim (--minded-sun-face-edge), and it keeps the snug reach,
which is about the bottom-edge clip (#106), not colour. The upshot is
that the everyday lift off the bottom bar into an intervention is now a
pure size and position morph rather than doubling as a colour change -
one sun, one light.

The cool half of the glow axis is untouched (the up-drag let-go read),
and the moon never warmed anyway.

Rule written down in CLAUDE.md and as a block comment atop sunSettle.ts,
with tests guarding every in-app settle against amber creeping back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvG5EVDfN7tVKWwatiMAUj
Dropping the companion's amber left four comments asserting the opposite -
that the canonical amber is "shared with the resting companion", that the
sun "carries a warm halo at all times". Corrected at all four sites
(sunAnimationUtils.ts, _variables.scss, LittleSun.kt, Sun.tsx), each now
pointing at the rule rather than restating it.

Add docs/sun-halo.md: the rule plus a full map of what the sun actually
looks like on every surface - the four knobs that vary, a per-state table
for day and for night, and the four out-of-app surfaces where the amber
legitimately lives. That map existed nowhere before, so "which sun is
which colour" could only be answered by reading five files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvG5EVDfN7tVKWwatiMAUj
The rule said "the widgets sit on the user's wallpaper, so they wear
amber". Only half of each widget does. Both platforms have two faces: a
small transparent one that floats on the wallpaper, and a prompt card
that paints the app's own sky behind the sun. The card is our surface, so
the amber bloom had no business being there.

Sharpen the test to what the sun *stands on* rather than which process
draws it, and give the card a white bloom:

- Android: ic_sun_widget_day_on_sky.xml, a twin of ic_sun_widget_day
  differing only in the bloom's four gradient stops. drawableFor() takes
  onOwnSky; PromptCard passes true. widget_preview_card.xml (the picker
  still that mirrors the card) uses it too. previewImage stays amber -
  the pre-31 gallery renders it on the launcher's surface, not ours.
- iOS: CompanionSun gains onOwnSky, switching the same stops at the same
  0.28 alpha to white; the systemMedium PromptCard passes true.

The disc keeps its faint gold rim on both - that is the body, not the
halo, and the in-app companion carries the same rim. The moon needs no
twin: it never warms on any surface.

Rule text updated in CLAUDE.md, sunSettle.ts, docs/sun-halo.md,
docs/sun-companion-widget.md and LittleSun.kt, and docs/sun-halo.md now
splits the out-of-app table into the two cases.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvG5EVDfN7tVKWwatiMAUj
… twins

Review of the branch found the reference doc I added states a falsehood
and that five comments still assert the old behaviour - two of them
inside blocks these commits edited. Also that nothing enforced the
"keep the two files in step" instruction written into three of them.

- docs/sun-halo.md said the Android Little Sun has an amber gradient
  face. It doesn't: LittleSun.kt's SUN_COLOR is Color.White. I had
  conflated the *native* overlay (30dp, white disc) with the *CSS* one
  the WebView draws (40px, amber gradient face) - there are two Little
  Suns on Android, with different sizes and faces. Split into rows and
  noted why sunSettle.ts keeps a departing target for each.
- Corrected the five surviving stale comments: Sun.tsx x2 (the glow-axis
  note still naming companion rest as warm; "warm, symmetric rest halo"),
  CompanionSun.swift's header, ic_sun_widget_day.xml's header (now says
  which twin it is and why), and the iOS widget README.
- Fixed a pre-existing error in the block these commits document:
  DEPART_GLOW_INTENSITY cited COMPANION_REST_GLOW as 1.8; it is 1.25
  (1.8 is the hover glow), and the claim that the companion wears a broad
  bloom contradicts SNUG_GLOW_REACH ten lines below.
- FingerRest's comments called its amber "the companion's own light" -
  the thing this branch just made white. It's the *little sun's* amber;
  reworded, and the pad itself deliberately left as-is.

New sunHaloMirror.test.ts guards the native half across the language
boundary, following widgetClockMirror.test.ts: the two drawables may
differ only in the bloom's four stops, the on-sky bloom is white and the
wallpaper one the canonical amber, the disc is identical on both, iOS
matches Android stop for stop (including 0x47 == 0.28), and each call
site passes onOwnSky by what the sun stands on. Verified by mutation -
amber on the on-sky bloom, a dropped onOwnSky, and an iOS colour drift
each fail it, and all three go green again when reverted.

sunSettle.test.ts's phase list is now a Record keyed by
Exclude<SunPhase,"departing">, so an eighth phase fails to compile rather
than silently escaping the guard (verified: TS2741).

574 tests pass, lint clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvG5EVDfN7tVKWwatiMAUj
@johannesjo
johannesjo merged commit ac11c5e into main Jul 25, 2026
3 checks passed
@johannesjo
johannesjo deleted the claude/sun-halo-detection-szirih branch July 25, 2026 17:35
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.

2 participants