Skip to content

Refetch a Windows ring on click, and give the notch right-click menu - #244

Merged
vinzdg merged 1 commit into
vinzdg:mainfrom
RawJat:feat/windows-ring-refresh
Sep 18, 2026
Merged

vinzdg merged 1 commit into
vinzdg:mainfrom
RawJat:feat/windows-ring-refresh

Conversation

@RawJat

@RawJat RawJat commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

On the Mac a click on a ring re-reads that provider, and right-clicking the notch opens a small menu. On Windows a click opened the vendor's page, and a right-click showed WebView2's own Back / Refresh / Print menu. This does what the Mac does.

Click. The ring presses in until its reading lands, and the reading turns once, as ProviderRing does. The arc has a layer of its own, so re-renders never cut the turn short. With animation effects off, only the press remains.

Right-click, on a ring or on the card:

Refresh now
Open claude.ai
───────────────
Quit Codenotch

The page item is a Windows addition, since a left click used to be the only way to reach it; it names the host as the Mac's Accounts button does. Keep open waits until the notch can fold (#239).

Focus. Windows only dismisses a popup menu whose owner is in front, so muda brings the notch forward before showing it, and typing stopped reaching the editor. Once the menu closes, focus goes back to the window that had it, unless something else took the front meanwhile.

One refresh path now serves the ring, this menu and the tray:

  • It gains the Grok arm Windows: add the Grok provider #236 did not add. The tray's Grok line and Refresh all were re-reading Claude instead.
  • An unknown provider now does nothing. Before, it fell through to Claude.
  • Claude's rate-limit wait stands, as on the Mac. Asking early only earns another 429 and a longer wait. The tray used to clear it.
  • refresh_usage and open_usage_page, which nothing called, are gone.

Languages. "Refresh now" and "Open %@" come from the Mac's catalog in Chinese, Japanese, Russian and Ukrainian. Korean reads English, as with the tray's catalog strings.

Test plan

  • cargo test: 93 pass, 2 ignored. One new test fails if a provider has no usage page of its own.
  • cargo clippy --all-targets: nothing new (main's one warning in tray.rs remains).
  • node windows/scripts/check-ui-scripts.mjs: both pages parse.
  • Live on Windows 11: a click refreshes the ring and the turn runs smoothly to where it started. Typing stays in the editor after the menu closes. With animation effects off, only the press shows.

…lick menu

A click on a ring re-reads that provider instead of opening its usage
page. The ring presses in until the reading lands and its arc turns once,
on a layer of its own so re-renders never cut the turn short. Reduce
motion keeps the press and drops the turn.

Right-click offers Refresh now, the provider's page (Open claude.ai, …)
and Quit Codenotch. Windows only dismisses a popup whose owner is in
front, so the menu brings the notch forward; focus goes back to the
previous window once it closes.

One refresh path now serves the ring, the notch menu and the tray. It
gains the Grok arm vinzdg#236 did not add, so the tray no longer re-reads
Claude when Grok is asked, and it leaves Claude's rate-limit wait
standing, as the Mac does. The two commands nothing called go.
@RawJat
RawJat requested a review from vinzdg as a code owner September 17, 2026 14:33
vinzdg pushed a commit that referenced this pull request Sep 18, 2026
Order in the handler list means nothing, and both branches were adding to
the same few lines of it, which is a conflict for no reason. Beside the
other window commands, it merges clean.
@vinzdg
vinzdg merged commit b95812f into vinzdg:main Sep 18, 2026
4 checks passed
vinzdg added a commit that referenced this pull request Sep 18, 2026
Follow-up to #244. settle() was only reached from the 6 s fallback or a
refused refresh, so every clicked ring stayed pressed for the full six
seconds. Each provider's reading listener now settles its own ring;
PRESS_MIN still keeps a very fast answer visible.
vinzdg added a commit that referenced this pull request Sep 18, 2026
The tray's Grok refresh already came in with #244's shared
refresh_provider, so #240's copy is dropped. Its run.log change is kept:
the placement line is appended rather than rewriting the file, carrying
#241's work-area and inset fields. Since that rewrite was the only thing
that ever emptied run.log, applog now starts the file again past 1 MB.
vinzdg added a commit that referenced this pull request Sep 18, 2026
Carrying the Windows notch to another edge by a handle, plus the settings
orb from #245, which it contains. The conflict kept #244's listener that
releases a clicked Claude ring when its reading arrives.

The new drop-zone window had no capability, so its listen('zones') was
refused and the zone under the pointer never lit up. It gets one of its
own with event listening only, not the notch's core:default.
@RawJat
RawJat deleted the feat/windows-ring-refresh branch September 18, 2026 17:32
vinzdg pushed a commit that referenced this pull request Sep 20, 2026
A plain press on the pill plus 4 px of movement dragged the window
anywhere, and letting go snapped it to the nearest edge of whichever
monitor it was over, saving one position that every edge shared. Since
#244 a click on a ring refreshes it, so a click that slipped moved the
notch instead (#251); and since #246 the move handle exists to change
edge, so the drag was doing its job too.

The drag now needs Alt held, and without it every press on the pill is a
click. It follows the pointer along the edge the notch is on and nowhere
else, inside the work area, and never changes edge: the move handle and
the Edge picker in Settings do that. It is the Mac's ⌥-drag
(NotchWindowController.dragged), which only ever moves alongOffset.

Each edge now remembers its own place, as the Mac keeps notchOffset per
edge. A move to another edge lands where the notch was last left on that
edge, centred if it has never been slid along it, and Recentre centres
only the edge it is on. A carry used to land centred on purpose, because
every edge shared one position and a carry dragged the old edge's
fraction along with it; with a place per edge that reason has gone.

The place is kept as a fraction of the edge rather than the Mac's points,
so an existing notch_y becomes the place for the edge it was saved on
without needing a screen to convert it, and a change of resolution keeps
the notch in the same part of the edge. notch_y is read once and never
written again.

One thing is lost: dragging no longer takes the notch to another monitor.
The Screen picker in Settings does, as on the Mac, and its caption no
longer claims the drag can. The drag hint is rewritten in the Mac's own
words, with its ru, zh-Hans, zh-Hant, ja and uk translations taken from
Localizable.xcstrings and ⌥ read as Alt; the Mac has no Korean, so that
sentence is new. The Ukrainian hint had been keyed to an older English
sentence and never showed; it does now.
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