Skip to content

fix(requests): close open Requests screens when the server turns requests off - #748

Merged
Quick104 merged 5 commits into
Silo-Server:mainfrom
Rhainland:fix/requests-close-when-disabled
Oct 24, 2026
Merged

Quick104 merged 5 commits into
Silo-Server:mainfrom
Rhainland:fix/requests-close-when-disabled

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-server#1201
Validation tasks: unblocks #328 C3
Pairs with Silo-Server/silo-android#560

When an admin turns requests off, the Apple apps hide the Requests entry points on the next return to the foreground, but a Requests hub, My Requests or request detail that is already open stays on screen. Its search then shows "Nothing on TMDB matched that search" and its actions fail. This change closes open Requests screens once the server answers that requests are off.

Approach

RequestsFeatureStore now records whether a probe has answered for the current session, so screens close only on an answered "unavailable", never while the answer is unknown, after a reset, or after a failed probe. The router keeps a list of pushed routes on every platform (it already did on macOS) and pops the Requests screens on top of the stack, so a title opened from Requests stays until Back reaches a Requests page. The library Collections grid now opens collections through the router as well, so that list stays in step with the stack. A requests call refused with capability_disabled (or not configured or unsupported) re-probes the status. On Apple TV the existing tab handling already switches to Home when the Requests tab disappears; a request detail pushed over it now closes too.

Validation

  • iPhone simulator against a local server: with the hub or a request detail open, turning requests off and returning to the app closes it and hides the menu entry; turning them back on restores the entry.
  • New unit tests for which routes close and when; request tests on iOS and tvOS pass. iOS, tvOS and macOS build.
  • Review fixes (cec1e116, e45ae3b6): a newer probe that fails no longer discards an older probe's answer, with a unit test for it; iOS and macOS build on the fix head, and CI covers tvOS.
  • permission_denied re-probe (99d98144): the capability re-probe test covers it.
  • Rebased onto main at b90a86ea. feat(ios): lay out the app for the iPhone Duo's folded and open screens #889's detail-card swipe property and the new route record sit side by side in AppRouter.swift. fix(macos): keep the library row highlighted when opening a collection #854 had already moved the library Collections grid onto router.navigate(to:) for the Mac sidebar, so this PR's Collections commit now only extends its comment. The fix(tvos): main fails to build after On Deck focus change #753 tvOS build break is fixed on main, so all three regression jobs run here.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-apple/pr-748/

Risks

The router now tracks pushed routes on iOS and tvOS too; the session-expiry return point saves and restores that list.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code (Bash, file edits, subagents), GitHub CLI (gh), Playwright, Xcode xcodebuild/simctl, Maestro, Android emulator/adb
  • Model(s): Claude Opus 5.5 (claude-opus-5-5)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: A separate Claude Code review pass (medium) covered every branch of the Requests validation fixes across silo-server, silo-apple and silo-android. Its findings (a commit message that misdescribed the unfollow response, a tablet layout that hid the title) were fixed. This was an AI self-review; no independent human review is claimed.

Note

Close open Requests screens when the server turns requests off

  • Adds AppRouter.closeRequestsScreens, which pops only the topmost contiguous run of Requests routes, leaving non-Requests pages and containing detail cards in place. ContentView triggers it when RequestsFeatureStore.shared.isKnownUnavailable becomes true.
  • Extends RequestsFeatureStore with probe ordinals so failed probes keep prior state, stale probes (pre-reset or older) are ignored, and reset returns the store to unknown.
  • All Requests API endpoints in SiloAPI now rethrow errors but schedule a capability refresh when the problem is capability_disabled, capability_not_configured, capability_unsupported, or permission_denied.
  • Route mirrors in AppRouter.swift now record pushed and nested detail routes on all platforms, not just macOS, and SessionReturnPoint captures them for session restore.
  • Risk: AppRouter.navigate(to:), presentItemDetail, and replaceCurrent now maintain route mirrors on iOS; the mirror must stay in sync with the opaque navigation paths or closeRequestsScreens and session restore (resetToHome) may miss or miscount routes.

Macroscope summarized 99d9814.

@silo-kody

silo-kody Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d43aba90-4dcc-4e0c-ada1-075ba6b570f4
Commits

Reviewing files that changed from the base of the PR and between 7818afc and 11ee3f8.

Files selected for processing: 2
  • iosApp/iosApp/ContentView.swift
  • iosApp/iosApp/Navigation/AppRouter.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The Requests feature store tracks capability probe results and refreshes after selected API errors. When Requests are known to be unavailable, the app closes topmost Requests routes. Route mirrors track navigation within iOS detail cards and persist through session return points.

Changes: Apple Requests Client

Layer / File(s) Summary
Request API and capability status
iosApp/iosApp/Networking/RequestsFeatureStore.swift, iosApp/iosApp/Networking/SiloAPI+Requests.swift, iosApp/Tests/RequestsScreensCloseTests.swift, docs/requests-api-v2.md
The feature store accepts successful probe results only when they are current, and preserves cached values after failures. Selected API problems trigger a refresh. Tests cover probe ordering, reset behavior, and re-probe conditions; the capability description documents probe ordering.
Route mirrors and navigation updates
iosApp/iosApp/Navigation/RequestsRouteVisibility.swift, iosApp/iosApp/Navigation/AppRouter.swift, iosApp/iosApp/Screens/Collections/CollectionsView.swift
The router tracks visible routes on all platforms and mirrors routes inside iOS detail cards. Session return points preserve route mirrors. Collection cards navigate through AppRouter.
Closing unavailable Requests screens
iosApp/iosApp/ContentView.swift, iosApp/iosApp/Navigation/AppRouter.swift, iosApp/Tests/RequestsScreensCloseTests.swift
ContentView closes contiguous topmost Requests routes when the feature is known to be unavailable. Tests cover route visibility and closing behavior in main and detail-card navigation.

Priority: Pending latest changes

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant SiloAPI
  participant RequestsFeatureStore
  participant ContentView
  participant AppRouter
  SiloAPI->>RequestsFeatureStore: refresh after a matching API problem
  RequestsFeatureStore-->>ContentView: report known unavailable state
  ContentView->>AppRouter: closeRequestsScreens()
Loading

Suggested reviewers: quick104

Merge Risk: Minimal · up to 11ee3

No merge-blocking Requests screen behavior is established; the change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 38.61% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 101 functions across 23 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: closing open Requests screens when the server disables Requests.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly explains the Requests screen-closing behavior, probe-state handling, routing changes, re-probing logic, validation, and risks covered by the changeset.
Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@silo-triage silo-triage Bot added api-v2 API v2 / Huma program (epic silo-server#135) bug Something isn't working priority: P2 Limited scope, workaround exists, or polish stacked Stacked on another open PR or branch labels Oct 12, 2026
@Rhainland
Rhainland force-pushed the fix/requests-close-when-disabled branch from 2855ce4 to e83d59b Compare October 12, 2026 22:59
@silo-kody

silo-kody Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of this PR's own commits (492be150, e83d59b7), on top of #747 and #746. One new finding is inline. I also added a common trigger to the existing route-mirror thread on AppRouter.swift. I'm fixing both in commits on this branch, so there's no need to change them yourself. A summary with the scores follows.

Review by Claude Code (claude-opus-5-5), with read-only review subagents.

@silo-kody

This comment has been minimized.

@Quick104

Quick104 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Review summary

Reviewed head: 99d98144, rebased onto main at b90a86ea. This rerun covers the author's permission_denied commit and the rebase. The first round, on e45ae3b6, covered the rest.

Since the last round

  • Blocked accounts (fixed by the author, 11ee3f83). A requests call refused with permission_denied now re-probes the status. The probe's answer still decides, so a refusal for another reason, such as cancelling someone else's request, costs one status call and changes nothing. The capability re-probe test covers the new code.
  • Rebase. main had moved, so the branch conflicted in AppRouter.swift: feat(ios): lay out the app for the iPhone Duo's folded and open screens #889 added the detail-card swipe property next to the new route record. I kept both. A second rebase picked up fix(macos): keep the library row highlighted when opening a collection #854, which had already made the Collections grid open collections through the router, so that commit now only extends a comment. Both pushes were force-pushes with a lease, so the branch history was rewritten. The patches are otherwise unchanged.
  • Mac sidebar Requests (feat(macos): show Requests in the sidebar's Discover group #828). On the Mac, Requests is now a sidebar destination, not a pushed route, so closeRequestsScreens doesn't see it. main already handles that case: when isEnabled turns false, the selection moves off the Requests row. A request detail pushed from that page is a pushed route and closes.
  • Route record. No NavigationLink(value:) or direct path change outside the router has appeared on main, so the pushed-route record still matches the stack. Kody's review of the rebased head had no findings.

Remaining

  • Design note (follow-up, not a blocker). Closing screens still depends on a hand-kept copy of NavigationPath. A typed [Route] path for both stacks would remove it.

Checks

Verdict

Fit: 9/10 · Readiness: 8/10 — conditional (assuming CI is green)

  • Fit: when the server turns requests off, open Requests screens now close, so users no longer hit searches that find nothing and actions that fail. Android has the paired change. The route copy adds some complexity, but it stays inside the router.
  • Readiness: every verified defect is fixed, and the blocked-account gap is closed. The one condition: the fixes since the published simulator run have build and unit-test coverage but no live re-check.

Review by Claude Code (claude-opus-5-5).

@Quick104
Quick104 force-pushed the fix/requests-close-when-disabled branch from 9f1f26f to e45ae3b Compare October 13, 2026 02:41
@silo-kody

This comment has been minimized.

@Rhainland Rhainland mentioned this pull request Oct 13, 2026
3 tasks done
Quick104 added a commit that referenced this pull request Oct 14, 2026
* chore(deps): pin AetherEngine with upstream 7.36.0

Move the AetherEngine pin to 23889c5b, the fork main that merges upstream
AetherEngine 7.29.0 through 7.36.0 plus upstream's live-playlist renewal
(#748), Silo-Server/AetherEngine#21.

Resolution moves LibTrueHD 2.0.0 to 2.3.0 and FFmpegBuild 3.6.0 to 3.7.1,
and adds LibDTSX 1.0.1, the DTS:X decoder behind objectAudioRendering.
Bundle LibDTSX's NOTICE and Apache license, list it in the
acknowledgements, refresh the LibTrueHD NOTICE and the provenance notes,
and refresh the reviewed build-input and selector snapshots for the new
project.yml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: count LibDTSX in the release source proof's package graph

The source proof requires the locked package graph to have an exact size.
The AetherEngine pin adds LibDTSX, so the graph has 12 packages and the
complete source graph 19 entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(tvos): show Dolby Vision in playback stats when the TV switches to it

An Apple TV set to SDR with Match Dynamic Range on switches the TV to the
content's range, but Aether can't prove the panel left SDR (its EDR
headroom stays 1.0), so it keeps reporting SDR. The stats showed
"Dolby Vision Profile 7 → SDR" while the TV displayed Dolby Vision.

When matching is on and the display supports the source's range, label
that range, as Aether serves it to the panel either way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(tvos): label the stats range from the load's own matching decision

A load made with HDR off in Silo's settings doesn't match the content's
range, so the TV stays in SDR; the stats now follow that load's
matchContentEnabled instead of the system setting alone. On a display
without Dolby Vision, a Profile 5 or 7 source shows HDR10, the PQ base
Aether routes there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(tvos): label a Dolby Vision base layer by its transfer

On a matched display without Dolby Vision, Aether presents the Dolby
Vision base layer: HLG for an HLG base, otherwise HDR10. Read the base's
transfer from sourceVideoStreamFormat instead of inferring it from the
profile number, so Profile 8.1 shows HDR10 and 8.4 shows HLG.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(tvos): mark the stats range unconfirmed when the TV can't prove it

tvOS reports one setting for frame-rate and range matching, so the app
can't tell whether the TV switched to HDR. Instead of claiming the TV's
mode, the stats name the range Aether sent and mark it unconfirmed, e.g.
"Dolby Vision Profile 7 → Profile 8.1 (unconfirmed)". A Dolby Vision
source with an SDR base layer (Profile 8.2) keeps the SDR label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(tvos): keep an SDR Dolby Vision base labelled SDR on any display

Aether strips Dolby Vision from an SDR base layer (Profiles 8.2 and 10.2)
and plays that base as SDR even on a Dolby Vision TV, so the stats check
the base layer's transfer before naming Dolby Vision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/L 200–499 added + deleted lines (all files); change volume, not priority. label Oct 17, 2026
@silo-kody

silo-kody Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Rhainland

Copy link
Copy Markdown
Contributor Author

Blocked accounts: fixed in 63581a1. A requests call refused with permission_denied now re-probes the status too, so a request screen open on an account that gets blocked mid-session closes, without waiting for the next foreground. The status answer still decides: when permission_denied has another cause, such as acting on someone else's request, the status still says allowed, and nothing changes. The capability reprobe test covers the new code. iOS tests pass and macOS builds. The SiloTV build still fails on #753 from the branch base, which the next rebase onto main clears.

The typed [Route] path stays a follow-up, as you suggested.

@Rhainland
Rhainland force-pushed the fix/requests-close-when-disabled branch from 63581a1 to 7818afc Compare October 17, 2026 19:08
@silo-kody

silo-kody Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 force-pushed the fix/requests-close-when-disabled branch from 7818afc to 11ee3f8 Compare October 24, 2026 02:30
@silo-kody

silo-kody Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Rhainland and others added 5 commits October 24, 2026 02:32
…ests off

The Apple apps re-probe /api/v2/requests/status on every foreground, which
hides the Requests entry points, but a Requests hub, My Requests, or request
detail that was already open stayed on screen. Its search then showed a
misleading "Nothing on TMDB matched" and every action failed with "Requests
are turned off". 1.0 Requests AC7 says a server with requests off shows no
request entry point anywhere, and Android now closes these screens.

Once a probe answers that requests are unavailable, the run of Requests
pages on top of the navigation stack closes back to whatever opened them,
as on Android. On iPhone and iPad this includes the detail card: a card
opened on a request detail closes, and a request page pushed inside a title
card pops. A title opened from Requests stays; the Requests pages under it
close when Back brings them into view. The same rule covers the Mac and
Apple TV stacks; on Apple TV the Requests tab already disappears and the
shell moves to Home, and a request detail pushed over it now pops as well.

Nothing closes while the answer is unknown: the store now records whether a
probe has answered for the current session, so the default "disabled"
before the first answer, after a profile or server switch, or after a failed
probe never closes a screen.

The router now mirrors pushed routes on every platform (it already did on
macOS for the sidebar) and inside the detail card, because NavigationPath
cannot be inspected. A requests call refused with capability_disabled,
capability_not_configured, or capability_unsupported triggers a re-probe,
so a screen in use closes without waiting for the next foreground.
Every probe now takes a new generation, so an older probe that answers
late cannot restore entry points after a newer probe found requests off.
Follow support is published before isEnabled, so observers of the gate
never read a stale value.
The library Collections grid pushed its pages with NavigationLink(value:),
which skips the router's record of pushed routes. Closing Requests screens
reads that record, so a leftover entry could line up with the collection
page. After a user opened Requests, went back, and requests were turned
off, every collection page popped as soon as it opened. The grid now
navigates through the router, like the other collection grids.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every probe bumped the generation, so a newer probe that failed threw
away an older probe's answer. Entry points could stay hidden, or open
Requests screens stay open, until the next foreground. Probes are now
numbered, and an answer counts unless a newer probe has already
answered. Reset still discards probes from the previous session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on_denied

An account blocked from requesting mid-session gets permission_denied
from the requests endpoints, which did not re-probe the status, so open
Requests screens stayed until the next foreground. The probe still
decides: a refusal for another reason answers allowed and changes
nothing.
@Quick104
Quick104 force-pushed the fix/requests-close-when-disabled branch from 11ee3f8 to 99d9814 Compare October 24, 2026 02:33
@silo-kody

silo-kody Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104
Quick104 merged commit 79a3de2 into Silo-Server:main Oct 24, 2026
10 checks passed
Quick104 added a commit to Silo-Server/silo-android that referenced this pull request Nov 15, 2026
…ts off (#855)

* fix(requests): re-check the requests capability when the app returns to the foreground

Requests entry points must disappear when the server turns requests off
(1.0 Requests AC7). Both shells probed /api/v2/requests/status only when
the server or profile changed, so an admin who turned requests off while
the app was in the background left the profile menu, search results, the
TV Requests tab, and any open Requests screen in place until a restart or
profile switch.

The foreground access check that runs when the app returns from the
background (phone and TV, process ON_START, skipped on the first start)
now also re-probes the requests capability, as the Apple clients do on
every foreground. The probe runs only after the shell's own probe for the
current session has answered and only while signed in, and it keeps the
store's generation guard against server and profile switches.

On phone, an open Requests screen (hub, My Requests, request
detail) now closes back to whatever opened it once a probe answers that
requests are unavailable, matching how the TV shell leaves its Requests
tab. A Requests screen restored before the first probe answers waits for
that answer.

(cherry picked from commit 779d7ce)

* fix(requests): close request screens whenever the server turns requests off

Builds on the foreground re-check from #560 so the Android apps match the
Apple apps (Silo-Server/silo-apple#748):

- A requests call the server refuses as requests-off (capability_disabled,
  capability_not_configured, capability_unsupported, permission_denied)
  reads the status again, so an app that stays in the foreground notices.
- Screens close only on an answered "unavailable" (isKnownUnavailable),
  never on a failed status read, and an older answer can't overwrite a
  newer one.
- Phone: the Discover row See all page closes with the other request
  screens.
- TV: request detail closes too, and the Requests page and detail pop back
  to what opened them, like Back, instead of a state-saving pop to Home
  that left Requests in the opening tab's saved stack.
- A failed token read in the foreground check no longer escapes its scope.

Closes #854

* fix(requests): re-check on return to the foreground while the first probe is out

The foreground check skipped until the shell's first status read had
answered. If the app went to the background while that read was out, and
it had read the status before requests were turned off, its stale
"available" stood until the next refusal or foreground return. Skip only
until the session's first probe has started.

* fix(requests): keep the library and Requests foreground checks independent

A failed library check no longer cancels the Requests status check that
runs beside it on return to the foreground. Also correct the TV entry
point in the README and FEATURES exposure notes: Requests opens from the
profile menu, not a top-bar tab.

* fix(requests): re-check on return to the foreground before the shell's first probe

A phone restored onto a Requests screen after process death never shows the
tab screen that starts the shell's status probe, so the foreground check
skipped every return and the screen stayed open after requests were turned
off. The foreground check already asks the server only while someone is
signed in, and the store discards answers from before a server or profile
switch, so it now probes without waiting for the shell.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Rhainland <[email protected]>
Co-authored-by: Quick <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-v2 API v2 / Huma program (epic silo-server#135) bug Something isn't working priority: P2 Limited scope, workaround exists, or polish size/L 200–499 added + deleted lines (all files); change volume, not priority. stacked Stacked on another open PR or branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants