Skip to content

Let the page decide whether we are on the start screen - #89

Merged
PatrickSt1991 merged 1 commit into
mainfrom
fix/at-home-follows-the-page
Sep 6, 2026
Merged

PatrickSt1991 merged 1 commit into
mainfrom
fix/at-home-follows-the-page

Conversation

@PatrickSt1991

Copy link
Copy Markdown
Contributor

His fourth report, and the best one:

when i open site that had images turned on previously from favourites and turn images off it turns off images globally instead for that site … if visit website by typing url turning images on/off changes setting only for that site

One wrong bit

_atHome was set by ShowHome and cleared by Navigate — that is, by whoever asked for a page. That misses every navigation this app does not perform itself, and opening a favourite is one of them: a tile is an ordinary link (the whole reason the start screen is a page rather than a native screen), so the engine follows it and nothing tells the app it left.

The browser then sat on Instagram still believing it was showing its own start screen. Everything keyed to that went wrong in a different way:

  • the images and identity switches wrote the browser-wide setting instead of the site's — because "no site" is exactly what the start screen is, so PageUrl() returned null and SiteRules.SetImages(null, …) correctly declined;
  • key 8 looked for a tile under the pointer and found none;
  • the address bar said start screen over a page that plainly was not it;
  • and turning images back on flashed them for one frame before the reload put the site's own rule back. That last one is the symptom that proves the diagnosis: it is the global setting and the site rule disagreeing out loud, exactly as the code would predict.

His control case — typing the URL — worked, because Navigate() is the one path that did clear the flag.

The fix, and the rule behind it

NoteShowing is called at every load boundary and sets the flag from Store.IsGenerated, so a navigation nobody in this app initiated still moves it. ShowHome and Navigate still set it optimistically (the bar should not lag a press) but are no longer the authority.

State that describes the page must be derived from the page, not from who asked for it.

This had been wrong since the start screen existed. It cost nothing until #74 gave the app something important to decide with it — the usual shape: the bug ships years before the feature that makes it reachable.

Checks

./build.sh all (five packages, 0 warnings) and tools/startpage/run.sh green. No src/common change this time — the decision it now defers to, Store.IsGenerated, is the one the start-page harness has covered since #53.

Issue 80's reporter: "when i open site that had images turned on previously from
favourites and turn images off it turns off images globally instead for that
site ... if visit website by typing url turning images on/off changes setting
only for that site".

_atHome was set by ShowHome and cleared by Navigate — by whoever asked for a
page. That misses every navigation this app does not perform itself, and opening
a favourite is one of them: a tile is an ordinary link, which is the whole reason
the start screen is a page rather than a native screen, so the engine follows it
and nothing tells the app it left. The browser then sat on Instagram still
believing it was showing its own start screen.

One wrong bit, four faces. The images and identity switches wrote the
browser-wide setting instead of the site's, because "no site" is exactly what the
start screen is. Key 8 looked for a tile under the pointer and found none. The
address bar said "start screen" over a page that plainly was not it. And turning
images back on flashed them for one frame before the reload put the site's own
rule back — the symptom that proves the diagnosis, since it is the global setting
and the site rule disagreeing out loud.

NoteShowing is called at every load boundary and sets the flag from
Store.IsGenerated, so a navigation nobody here initiated still moves it. ShowHome
and Navigate still set it optimistically, because the bar should not lag a press,
but they are no longer the authority.

The rule: state that describes the page must be derived from the page, not from
who asked for it. This had been wrong since the start screen existed and cost
nothing until #74 gave the app something important to decide with it.
@PatrickSt1991
PatrickSt1991 merged commit b6911d7 into main Sep 6, 2026
7 checks passed
@PatrickSt1991
PatrickSt1991 deleted the fix/at-home-follows-the-page branch September 6, 2026 16:41
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