Remove app mode auto-toggle for small viewports#155
Merged
hiroTamada merged 1 commit intomainfrom Feb 19, 2026
Merged
Conversation
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>
rgarcia
approved these changes
Feb 19, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ensureAppModelogic that automatically added--appflag and forced Chromium restarts when switching to viewports below 500px widthRemoveFlagsByPrefix,HasFlagWithPrefix,appModeURLconstant, and associated testsTest plan
--appmode or restartMade 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--appflag (and no longer force a restart solely due to that toggle).Cleans up the now-unused support code by deleting
appModeURL,ensureAppMode, and thechromiumflagshelpersRemoveFlagsByPrefix/HasFlagWithPrefixalong with their unit tests;chromiumFlagsPathis 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.