Skip to content

feat(native): open the native window on every release, with an experimental notice - #809

Merged
omartelo merged 1 commit into
mainfrom
feat/native-on-every-release
Oct 17, 2026
Merged

omartelo merged 1 commit into
mainfrom
feat/native-on-every-release

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

While the native window is experimental, every update should land users on it, so we can tell whether it works.

What changes

  • Native on every release. On the first launch of each release, the backend sets window.kind to native and records the version in window.nativeRelease (switchToNativeOnRelease in main.go; the decision is system.SwitchesToNative). A native window that cannot start falls back to the web one, as before. A user who switches back in Settings stays on the web window until the next release.
  • Skipped for a dev build (task dev) and for an install without lich-native beside lich (macOS today), which would otherwise fall back on every launch.
  • Experimental notice. The first time the native window opens, a dialog says it is experimental and asks for an issue on anything that breaks. "Report an issue" opens the same prefilled bug report as Settings › Help. Closing it any way records native.experimentalNoticeSeen, so it shows once per user, not once per release. Strings in all 7 native locales.

Not covered

  • The web window does not show the notice, so a user who lands on the fallback never sees it.
  • After an update, the notice and the patch notes dialog can open together; the notice sits on top.

Verification

  • Backend: gofmt, go vet ./..., go test ./internal/system/ (new TestSwitchesToNativeOncePerRelease). go vet ran with a placeholder frontend/dist.
  • native/: gofmt, go vet ./..., go test ./....
  • A -shot against the isolated slice backend, with the seen key unset, shows the dialog.
  • Not run: the full backend go test ./... and the frontend gate (frontend untouched).

…mental notice

The first launch of each release chooses the native window (falling back
to the web one where it cannot start), so every update is tried on it
while it is experimental. A dev build and an install without lich-native
are left alone. The first native window a user opens says it is
experimental and links to a bug report.
@omartelo
omartelo merged commit fbb9176 into main Oct 17, 2026
10 checks passed
@omartelo
omartelo deleted the feat/native-on-every-release branch October 17, 2026 18:53
omartelo added a commit that referenced this pull request Oct 17, 2026
…ve first launch (#816)

* fix(ci): switch the release e2e back to the web window after the native first launch

The first launch of a release opens the native window since #809, and the
macOS and Windows end-to-end checks expected the web one on it.

* fix(ci): wait for the native window to attach before the e2e switches back

On the slower Intel runner the switch came before the native window had
attached, so lich had no window of it to close and both stayed open. lich now
logs the attach, and the macOS and Windows checks wait for it.

* test(terminal): run the tests that exec a script they wrote, or rebind a freed port, serially

#813 ran them in parallel. A test that writes a script and execs it fails
with ETXTBSY when another test forks while the script is still open for
writing (golang/go#22315), and the port-retry test can lose its freed port
to a parallel test's 127.0.0.1:0. Measured on the package: 1 failure in 15
runs before, 0 in 25 after.
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.

1 participant