Skip to content

Keep daylight/nightlight icon in place while toggling - #16722

Open
gaburn wants to merge 2 commits into
omacom:quattrofrom
gaburn:fix/nightlight-indicator-position
Open

gaburn wants to merge 2 commits into
omacom:quattrofrom
gaburn:fix/nightlight-indicator-position

Conversation

@gaburn

@gaburn gaburn commented Oct 26, 2026

Copy link
Copy Markdown

Summary

 on daylight/nightlight toggle
   update state, dimming, and tooltip immediately
-  move the icon between active and inactive groups
+  preserve its group while the controls are revealed
+  regroup when the controls collapse

Keep click targets stable for repeated toggles, including always-shown indicators and horizontal/vertical bars. Status-only indicators, such as remote sessions, still appear and disappear immediately.

Evidence

  • Before: bash test/shell.d/indicator-contract-test.sh reproduces moving click targets and destroyed clicked icons when toggling nightlight.
    After: The same regression passes for both fixed edges, both orientations, and always-shown indicators; state and tooltip changes remain immediate.
  • Visually checked off/on/off in the running bar: the nightlight icon and neighboring icons remain in place.
  • Remote-session checks pass. The full shell run encountered an unrelated screenshot-sanity-test.sh failure, also reproduced on the unchanged base.

Merge Danger

Door: two-way

No configuration changes or migrations; revert to restore immediate regrouping.

Blast Radius: indicators

Shared indicator placement changes while controls are revealed; collapsed active ordering and status-only visibility are preserved.

Defer active/inactive regrouping until the controls collapse so toggling nightlight does not move or destroy the clicked icon. Keep state presentation and status-only indicators responsive.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Keeps indicator buttons in place while controls are revealed.

  • Indicator icons stay in place while revealed controls are toggled.

No actionable issues found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Indicator state changes] --> B[Update appearance and tooltip]
  B --> C{Controls revealed?}
  C -->|No| D[Update active group]
  C -->|Yes, toggle control| E[Keep current group]
  C -->|Yes, status-only icon| D
  E --> F[Controls collapse]
  F --> D
Loading

Reviews (2) · Last reviewed commit: "Merge quattro into fix/nightlight-indica..." · Reviewed by Greptile

@reubgr

reubgr commented Nov 1, 2026

Copy link
Copy Markdown

This matches the behavior seen on my desktop: clicking Night Light moves the icon toward the clock, so Day Light appears where the neighboring Silence Notifications control was. Keeping the same click target is the behavior I expected.

Independent checks run with Codex on this machine: applied the production changes and indicator-contract fixture from this PR to upstream 7eedd17 (November 1). indicator-contract-test.sh passes with the fix. Keeping the same test fixture and removing the production changes fails on moving click targets and destroyed clicked icons for both fixed edges, both orientations, and always-shown indicators. The current upstream remote-session-test.sh also passes with the production fix.

The full desktop visual check was inconclusive, so this is automated regression confirmation rather than a claim of independent visual verification. The installed shell was restored after the attempted check. Thanks for addressing this!

@omarchybot omarchybot added the bug Something isn't working label Nov 2, 2026
quattro removed the source-text asserts in remote-session-test.sh that this branch had updated for the renamed BarIndicator property, so its version is taken whole.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified on a worker. The bug is real, and this fixes it.

Reproduced with real clicks. On a worker running the actual bar, I hovered the indicators to reveal them and clicked Night Light twice at the same spot, on quattro (a69b19f) and on this branch. On quattro, the first click turns Night Light on and moves it into the active block, which slides Do Not Disturb under the pointer. The second click then turns on Do Not Disturb, and Night Light stays on. On this branch, Night Light stays where it was and brightens, and the second click turns it off again.

quattro, after the first click: Night Light has moved into the active block and the Do Not Disturb bell is now under the pointer
quattro, after the second click: Do Not Disturb has turned on instead, and Night Light is still on
This branch, after the first click: Night Light is lit in its original place, under the pointer
This branch, after the second click: Night Light is dimmed again in the same place, and nothing else changed

The captures are cropped to the indicators, with the display at 2x. hyprctl hyprsunset temperature confirmed each state change (quattro: 4000 after both clicks; this branch: 4000, then 6500).

Pushed: a merge of quattro into the branch (0ee7a77). The branch conflicted with quattro in test/shell.d/remote-session-test.sh: #16334 had already removed the source-text assertions this PR updated for the renamed property, so I took quattro's version of that file. Your commit is otherwise unchanged.

Tests on the worker, at 0ee7a77:

  • Pass: indicator-contract, remote-session, remote-session-service, bar, bar-widget-contract, bar-click-clipping, bar-icon-geometry, nightlight and passwordless-sudo-indicator, and ./test/cli.
  • Full shell suite: 7263 passed, 8 failed, across 9 files. Five of those files fail the same way on unchanged quattro: agent-account-exec, ascii, branding-about-animation, first-run and runtime-smoke. The other four are signal-timing tests that pass when run alone: channel-switch, screenrecording-process, ssh-reconnect and t3code-install. None of the nine touch the indicators.

Second opinion: Codex Medium and muse-wonder (via pi, thinking high). Both reviewed the merged tree, and neither found a correctness defect. Both traced the status-only path and found that an indicator toggled during a reveal regroups correctly when the reveal ends. They split on one point, which is also the one thing I'd flag:

  • With alwaysShow on, the reveal never ends, so regrouping never happens. An indicator that is active at startup, or that turns on later, stays in its place among the others at full brightness and never joins the active block at the fixed edge. Today it does. Codex reads this as the intended stable order, and the description does say "including always-shown indicators". muse-wonder reads it as a regression in how always-shown trays group. The fixture's always-shown case doesn't cover startup grouping. Whether always-shown trays should still group active indicators is a product call, so I've left it for the maintainer rather than change it.

Two smaller notes from the review, neither changed:

  • Removing effectiveActive from BarIndicator would break a third-party indicator that read it. Nothing in the repository does.
  • A settings reload while the tray is revealed still regroups immediately.

Waiting on the maintainer's call on the alwaysShow behaviour. Nothing is needed from you unless they ask for a change.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 15, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Rechecked head 0ee7a7716e08488b7af89e0c30df10a1e5f38c01 against current quattro. The branch now conflicts in test/shell.d/fixtures/indicator-contract/shell.qml with the hover-reveal changes from #18524. No tests were rerun and no commits were pushed.

The fresh classification disagreed: GPT-6 in Codex classified the moving click target as a bug; DeepSeek (deepseek-v4p1-flash) returned enhancement. The effort settings were not recorded for these classifications. This was a classification check, not another code review. Waiting on the maintainer to resolve the classification before further verification.

@omarchybot omarchybot removed the bug Something isn't working label Nov 18, 2026
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.

3 participants