Skip to content

Improve startup reliability and add opt-in lifecycle actions - #100

Merged
czyt merged 3 commits into
mainfrom
codex/startup-lifecycle-actions
Nov 11, 2026
Merged

czyt merged 3 commits into
mainfrom
codex/startup-lifecycle-actions

Conversation

@czyt

@czyt czyt commented Nov 11, 2026

Copy link
Copy Markdown
Member

Portable startup now uses CreateProcessW with explicit paths, correct quoting, no inherited handles and closed launch handles.

Add opt-in lifecycle actions in the INI and bilingual embedded settings page. The first real browser owner runs startup and the last normal owner runs exit; forwarded URLs and extra profiles do not duplicate commands. Restart ordering is coordinated in memory, and exit commands are waited on for at most three seconds without killing them.

Validation:

  • x86, x64 and ARM64 builds and native regressions: https://github.com/ca-x/vivaldi_plus/actions/runs/42967150425
  • Eleven native lifecycle integration scenarios, including delayed registration and malicious inherited CWD.
  • Real Chrome 157 and Vivaldi 8.2 startup, forwarding, multiple profiles, normal close, portable relaunch and native restart ordering.
  • Real WebUI save/reload with quoted executable paths and arguments, INI comments, opt-out, Chinese/English, themes and mobile layout.

Defaults remain disabled. Commands require an explicit interpreter for scripts; no immediate-run UI is added. Crash/forced-termination exit actions are not guaranteed.

虫子樱桃 added 3 commits November 11, 2026 13:22
Launch the browser directly with CreateProcessW and close launch handles. Coordinate optional startup and exit commands across real browser owners so additional windows and forwarded URLs do not run commands twice. Expose the same settings in the bilingual embedded interface while keeping both commands disabled by default.

Constraint: No upstream GPL implementation, new dependencies, persistent coordination files or implicit command shell

Rejected: Unconditionally run actions in every main process | forwarded URLs and multiple profiles would duplicate actions

Confidence: medium

Scope-risk: moderate

Tested: 16 WebUI regressions and 8 browser layout/language/theme combinations; native integration tests added

Not-tested: Native process launch and lifecycle execution await Actions toolchain
…mmands safely

Adopt real same-installation owners before deciding that the last browser exited, and let their later registration claim the existing record. Resolve executable names only through explicit application, system and absolute PATH directories so inherited working directories cannot select an unintended interpreter.

Confidence: medium

Scope-risk: narrow

Tested: Added deterministic held-registration, adoption, forwarding and malicious-CWD regressions; Node syntax and diff checks

Not-tested: New native cases await Actions compilation
Keep console-only startup and exit commands in the background while leaving GUI applications free to display their own windows.

Tested: Added native helper assertion for no inherited or new console; script syntax and diff checks

Scope-risk: narrow
@czyt
czyt merged commit 441bb9c into main Nov 11, 2026
4 checks passed
@czyt
czyt deleted the codex/startup-lifecycle-actions branch November 11, 2026 06:42
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