Repository navigation
feat(web): let a browser ask who's watching at launch - #2023
Conversation
Silo 1.0 requires every client to let the user choose between remembering the last profile and asking who is watching at launch; the web app could only remember. Settings > Your Devices now has a per-browser Profile at launch option. With Ask who's watching, each new tab or window starts at the profile picker and a PIN-protected profile needs its PIN again, while open tabs keep their own profile. Remember last profile stays the default and behaves as before.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The new-tab launch behavior lacks comparative evidence: Suggested fix: Add those captures and the recording to the Evidence section; no code diff applies. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
The linked validation task tables currently show only Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
|
Evidence: FAIL (desktop-only web) Devices setting and launch picker Before|After at 1280×800 are present, but this web UI is also visible at phone width with no phone-width capture (and no mobile-unaffected note). Fix: add phone-width captures of the Devices setting and/or ask-at-launch picker, or state that mobile is unaffected. Grok commenting on Quick's behalf. |
|
The current Evidence section includes desktop and phone new-tab comparisons and a recording of selecting Ask who’s watching, opening a new tab, selecting the PIN-protected profile, and entering its PIN. Validation tasks is already none; the listed tasks still need their initial validation. The duplicate-tab finding was withdrawn in its thread and is now resolved. |
Quick104
left a comment
There was a problem hiding this comment.
Review at d7da42342. Two findings below need a product decision, and one is a low-severity edge case. The main gap, restored and reopened tabs, is posted as a reply in the existing duplicate-tab thread on storage.ts, because it answers the argument made there. I'm not pushing changes for any of these. Each one has more than one reasonable fix, so the choice is yours. The summary comment has the scores and the remaining checks.
Claude (claude-opus-5-5) commenting on Quick's behalf.
|
|
||
| type ProfileScope = "shared" | "tab"; | ||
|
|
||
| function profileScope(): ProfileScope { |
There was a problem hiding this comment.
Low: a tab's scope doesn't follow a later switch back to Remember.
Trigger: the browser is in Ask mode, and tab A was opened after that, so its scope is tab. In tab B, the user switches to Remember last profile. adoptTabProfileSelection only moves tab B. Tab A keeps silo-profile-scope=tab in sessionStorage until it is closed, reloads included.
Impact: while tab A stays open, a profile picked there is not remembered for new tabs. isProfileLaunchPending() also stays true in tab A, so after a sign-in there, an account with one unlocked profile still lands on the picker, even though the setting says Remember. The settings page in tab A shows Remember as selected, so nothing tells the user why the tab behaves differently.
Repair options: (a) in profileScope(), treat a stored tab as stale when the launch setting is no longer ask, and move the tab to shared (adopting its selection, or dropping it so the remembered profile applies); or (b) keep it as it is, and say in the helper text that the change applies to tabs opened afterwards, as it already does for Ask. Option (a) changes which profile new tabs open if tab A's selection is adopted, so dropping it may be the safer variant.
| const [mode, setMode] = useState<ProfileLaunchMode>(getProfileLaunchMode); | ||
| const labelId = useId(); | ||
|
|
||
| function choose(next: ProfileLaunchMode) { |
There was a problem hiding this comment.
Needs your call: any profile can turn Ask off, including a child profile.
/settings/devices has no profile gate, so a child profile on a shared computer can open Settings > Your Devices and switch the browser back to Remember last profile. Nothing is unlocked by itself: the adoption copies the child's own selection, and switching to the parent still needs the PIN. But the next time the parent unlocks their profile in that browser, it's remembered again, and new tabs open it without the PIN until someone notices the setting changed.
#2019 just limited household powers to the primary profile, so this may be worth matching: only the primary profile (or a PIN-verified selection) can switch from Ask to Remember, while switching to Ask stays open to everyone. Leaving it open is also defensible, since it's one browser's preference and not an account setting. If you keep it open, it would help to say so in the user manual issue (Silo-Server/siloserver.org#114).
Review summaryReviewed head: Fit: 9/10 · Readiness: 6/10 (conditional) Fit. This closes the web gap in the 1.0 multi-profile criterion (#1179 AC2: every client lets the user choose between remembering a profile and asking who's watching). The setting is browser-local, which is the only place it can live: it has to be read before any profile exists, and the server's device settings are per profile. It sits in Settings > Your Devices under a clear "This browser" label. Remember stays the default, so nothing changes for people who never open the setting. Readiness. Remember mode is unchanged.
I made no commits. Each item above has more than one reasonable fix. Considered and left out: a sign-out or sign-in in another tab leaves a live tab's React profile and in-memory proof in place until it reloads. Remember mode already behaves that way, so this PR doesn't introduce it. Also left out: a fallback for browsers where sessionStorage throws but localStorage works. That's rare, and I found no concrete browser that does it. Validated features. No passed case is affected. The cases this diff could reach (admin impersonation #1200 C1–C2, invitation sign-up #1197 C2, branding #1229 C1, calendar #1136 C3, person browsing #1144 C5) take the same Remember-mode path as before. Earlier feedback. The phone-width evidence and the recording that Macroscope and the earlier evidence comment asked for are now in the PR body, and the published evidence page is linked from the Evidence check. User manual. Silo-Server/siloserver.org#114 covers the new option. If the restore behaviour stays as it is, that issue should say a reopened or restored tab keeps its profile. Apple and Android. Web-only change. Apple already offers the option, per the PR body. Android tracks it in Silo-Server/silo-android#473 and #499, with Silo-Server/silo-android#498 open for TV. Method. A multi-agent code review at high effort (three finders and a validation-impact check), plus one cross-provider round with Codex (gpt-6.1-sol) that reproduced the restore case against a mounted Claude (claude-opus-5-5) commenting on Quick's behalf. |
Main's eager launch bundle is 322026 B brotli, 42 B past the budget's 1024 B tolerance, so Web (build) fails on main and every pull request. Most of the growth since the budget was last set comes from #2023: the per-tab profile choice and "Who's watching?" check run during sign-in on every launch, so they can't be loaded lazily. Moving its settings-only helpers into their own module made the bundle 199 B larger, so this records the current size instead. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Problem
Related issue: #1179
Validation tasks: none
The web app always reopens the last profile used in a browser. Silo 1.0's multi-profile criterion (#1179 AC2) requires every client to let the user choose between remembering the last profile and asking who is watching at launch, and the Apple apps already offer it. On a shared computer there was no way to make the web app ask, so a child could open a new tab straight into the parent's profile.
Approach
Settings > Your Devices gets a "This browser" group with a Profile at launch option: Remember last profile (the default, unchanged) or Ask who's watching. It is stored in this browser only, because it has to be read before any profile is chosen.
With Ask who's watching, each new tab or window starts at "Who's watching?" and a PIN-protected profile needs its PIN again, which matches AC3 for a device that does not remember the profile. Each tab keeps its own profile choice in sessionStorage, so opening a tab does not change the profile of tabs already open. Reloading a tab keeps its profile. Signing out, a refused session or a change of account clears the choice in every tab. Switching back to Remember last profile keeps the current tab's profile as the remembered one. "Duplicate tab" copies the tab's session, so a duplicated tab keeps its profile.
Validation
7d4b8318e.mainatca4f71b6edoes not compile (internal/catalog/catalog_resolver.go:2172), so CI on this PR will fail on that file untilmainis fixed.make test-webpasses.Evidence
Settings > Your Devices:
A new tab opened on a title link while signed in as the PIN-protected Parent profile. Before, the setting does not exist and the tab opens the last profile without asking; after, with Ask who's watching selected, the tab starts at the picker:
Recording (after, 28 s): select Ask who's watching in Settings > Your Devices, open a title in a new tab, pick the PIN-protected Parent profile, enter its PIN, and the tab continues to the title:
2023-after-ask-newtab-pin.mp4
Phone width (390×844). Settings > Your Devices, and a new tab opened on a title link (after: with Ask who's watching selected; before: the setting does not exist, so the tab opens the last profile):
Surface and build: web app. Desktop (1280×800): Devices before
7d4b8318e(main), new tab before74158b4a8(main), afterd7da42342, recording ond7da42342. Phone (390×844, mobile emulation): before74158b4a8(main), afterd7da42342. Captured with headless Chromium against a test server with synthetic media; artwork is blurred.Risks
Checklist
AI Disclosure
Note
Add browser-local "ask which profile at launch" setting with per-tab profile isolation
sessionStorage(storage.ts). Tabs keep isolated selections and separate epoch markers; switching back to remember adopts the current tab's selection into shared storage.AuthProviderends the profile epoch: it clears shared profile values and marks tab-scoped selections from the prior epoch as stale (useAuth.tsx).usePostSignInNavigationand the sole-profile bootstrap now skip auto-selection when an ask-mode launch is pending, sending the user to the profile picker instead (usePostSignInNavigation.ts).storage.get/set/removenow route through tab-scoped storage when the tab's scope is active; other keys are unchanged. First profile access in a tab fixes that tab's scope based on the launch mode at that time.Macroscope summarized d7da423.