Skip to content

Remove app mode auto-toggle for small viewports#155

Merged
hiroTamada merged 1 commit intomainfrom
rollback-app-mode
Feb 19, 2026
Merged

Remove app mode auto-toggle for small viewports#155
hiroTamada merged 1 commit intomainfrom
rollback-app-mode

Conversation

@hiroTamada
Copy link
Copy Markdown
Contributor

@hiroTamada hiroTamada commented Feb 19, 2026

Summary

  • Removes the ensureAppMode logic that automatically added --app flag and forced Chromium restarts when switching to viewports below 500px width
  • The patched kernel-browser removes Chromium's minimum width constraint, making this workaround unnecessary
  • Removes RemoveFlagsByPrefix, HasFlagWithPrefix, appModeURL constant, and associated tests

Test plan

  • Verified locally with patched Chromium (v145) — 390x844 viewport works without --app mode or restart
  • CI passes

Made with Cursor


Note

Low Risk
Removes a conditional flag-mutation path during display resizing; behavior change is localized and simplifies the restart logic, with minimal impact outside small-viewport scenarios.

Overview
Removes the small-viewport “app mode” workaround in PatchDisplay: resolution changes no longer auto-add/remove the Chromium --app flag (and no longer force a restart solely due to that toggle).

Cleans up the now-unused support code by deleting appModeURL, ensureAppMode, and the chromiumflags helpers RemoveFlagsByPrefix/HasFlagWithPrefix along with their unit tests; chromiumFlagsPath is kept as a single constant for flag-file operations.

Written by Cursor Bugbot for commit c47197f. This will update automatically on new commits. Configure here.

The ensureAppMode logic automatically added --app flag and forced
Chromium restarts when switching to viewports below 500px width.
This is no longer needed since the patched kernel-browser removes
Chromium's minimum width constraint.

Removes ensureAppMode, appModeURL, RemoveFlagsByPrefix, HasFlagWithPrefix,
and their associated tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hiroTamada hiroTamada requested review from Sayan- and rgarcia February 19, 2026 01:32
@hiroTamada hiroTamada merged commit da32dd8 into main Feb 19, 2026
5 checks passed
@hiroTamada hiroTamada deleted the rollback-app-mode branch February 19, 2026 21:59
AbdulRashidReshamwala pushed a commit to reclaimprotocol/popcorn-images that referenced this pull request Mar 26, 2026
## Summary
- Removes the `ensureAppMode` logic that automatically added `--app`
flag and forced Chromium restarts when switching to viewports below
500px width
- The patched kernel-browser removes Chromium's minimum width
constraint, making this workaround unnecessary
- Removes `RemoveFlagsByPrefix`, `HasFlagWithPrefix`, `appModeURL`
constant, and associated tests

## Test plan
- [x] Verified locally with patched Chromium (v145) — 390x844 viewport
works without `--app` mode or restart
- [ ] CI passes

Made with [Cursor](https://cursor.com)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Removes a conditional flag-mutation path during display resizing;
behavior change is localized and simplifies the restart logic, with
minimal impact outside small-viewport scenarios.
> 
> **Overview**
> Removes the *small-viewport “app mode” workaround* in `PatchDisplay`:
resolution changes no longer auto-add/remove the Chromium `--app` flag
(and no longer force a restart solely due to that toggle).
> 
> Cleans up the now-unused support code by deleting `appModeURL`,
`ensureAppMode`, and the `chromiumflags` helpers
`RemoveFlagsByPrefix`/`HasFlagWithPrefix` along with their unit tests;
`chromiumFlagsPath` is kept as a single constant for flag-file
operations.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c47197f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: Cursor <cursoragent@cursor.com>
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