Repository navigation
fix(requests): remove request moderation from the phone and TV apps - #558
Conversation
The 1.0 Requests acceptance criteria keep request administration (approve, decline, retry, limits, auto-approve) in web admin, and the native validation tasks say not to expose it on native clients. The Android apps still offered it: an Approvals screen and summary cards on phone, approval and failed-request rows on TV, and Approve, Decline, and Retry on the request detail pages of both. This removes that surface and the code behind it: the admin request endpoints in RequestsApi and their models, the admin capability probe and canModerate in RequestsFeatureStore, RequestApprovalsViewModel, the moderation state in RequestDetailViewModel and RequestDetailCache, and the requests/approvals route. Users keep requesting titles, cancelling their own pending requests, and following request status. Without the moderation lookup, the detail page's own create or cancel broadcast could reach its listener after the action finished and trigger a second read; the page now ignores the broadcast of its own action. A source guard test fails if Android code calls the admin request endpoints or brings the moderation surface back. AGENTS.md, FEATURES.md, and README.md now say request administration stays in web admin.
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:
|
|
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 1 minute. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to This change removes admin request moderation from the Android and TV apps and keeps request submission, cancelling one's own request, and status display. No actionable merge-blocking risk is evident from the supplied context. Admins who relied on in-app moderation must use the web admin instead. Pre-merge checks ·
|
| data object Requests : Route("requests") | ||
| data object MyRequests : Route("requests/mine") | ||
| data object RequestApprovals : Route("requests/approvals") | ||
| data class RequestDetail( |
There was a problem hiding this comment.
Back-stack restoration failure in androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/Routes.kt can crash an admin's session on recreation after an update because removing requests/approvals from the navigation graph invalidates back stacks saved by the previous build. Retain a redirect-only legacy destination to Requests, following the existing admin alias in AppNavigation, and narrowly allow that alias in the source guard without restoring moderation.
Prompt for LLM
File androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/Routes.kt:
Line 142:
Back-stack restoration failure in `androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/Routes.kt` can crash an admin's session on recreation after an update because removing `requests/approvals` from the navigation graph invalidates back stacks saved by the previous build. Retain a redirect-only legacy destination to Requests, following the existing `admin` alias in AppNavigation, and narrowly allow that alias in the source guard without restoring moderation.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
Fixed in cb9ffa6: a hidden requests/approvals destination now redirects to Requests, like the existing admin and settings/card_overlays aliases, and the source guard allows only its two lines. A normal app update force-stops the package and finishes its activities, so the old saved state is unlikely to reach the new build; the alias follows the repo's convention for removed routes.
There was a problem hiding this comment.
Thanks—based on your description, cb9ffa6e4 addresses the suggestion: the hidden requests/approvals alias redirects to Requests without restoring moderation, and the source guard permits only the compatibility code.
Your update-lifecycle clarification is fair. I overstated the risk by labeling this critical without demonstrating that an old back stack could reach the new build. This is better characterized as defensive backward compatibility consistent with the repository’s existing removed-route aliases.
Removing the requests/approvals destination left no destination for a back stack saved by an older build, and Navigation throws when it restores an entry whose destination is missing. Register a hidden redirect to Requests, like the existing admin and card overlays aliases, so such a restore lands on Requests. It renders nothing and offers no moderation. The source guard allows only the alias's two lines in AppNavigation.kt.
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:
|
Silo-Server#558 merged as a squash of this branch's first two commits; this keeps the follow commit on top of current main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo-Server#439) * feat(requests): make requests look and behave like the rest of the app Port the iOS and tvOS Requests redesign (silo-apple Silo-Server#558, Silo-Server#561, Silo-Server#540) to Android phone and Android TV. - Shared: the server's `state` decides display status; a four-step progress track; My Requests buckets; a session detail cache with prefetch; admin approve/decline/retry with a 60-second hold after a lost response; create, cancel and moderation are never resent. - Phone: large-title hub with a status summary, My Requests in grouped rows with a filter menu and swipe to cancel, a new Approvals page, and request detail on the library title hero. - TV: Requests becomes a top-bar tab in the Skyline layout, with a preview panel that shows status and progress, admin rows, and request detail on the library detail hero. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(requests): address review findings on request state and routing - Clear request session state on every feature reset (sign-in, sign-out, server and profile switches) and drop reads or mutation broadcasts that answer after a reset. - Approval reads: a newer read wins, and a read sent before a decision can't bring the decided row back. - Unconfirmed create and cancel holds now end only when a read shows the result, or after 60 seconds, like admin decisions. - A proxy's 502/503/504 without the server's problem body counts as an uncertain outcome. - Request detail reuses a /requests/mine read from the last 30 seconds, re-reading only to settle an uncertain action; the hub counts pending approvals from one page; a page's own decision no longer triggers a second read. - TV long-press actions are computed by the caller, so the dialog no longer writes parent state during composition. - RequestRouter moves to android-shared and handles every request tap on phone and TV, including both search screens. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(requests): address PR review findings - TV: each request detail opened from another one gets its own back-stack entry and view model, instead of reusing the current one. - TV: a failed action's message no longer replays when the page returns, and an approval queue that fails to load says so. - Request detail applies a create, cancel or decision result as soon as the server returns it, so a failed re-read can't bring back Request, Cancel or the decision buttons. - A failed or declined title the server calls requestable offers Request again instead of a blocking status. - A /requests/mine read that a create or cancel overtook keeps the patched list and doesn't count as fresh. - Phone: My Requests pull-to-refresh also refreshes the approvals card; grouped rows are separate lazy items; the row error text comes from the caller. - FEATURES.md no longer says the admin stats dashboard is exposed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Problem
Related issue: Silo-Server/silo-server#1201, #27
Validation tasks: unblocks #338 C3, #339 C3
The Requests acceptance criteria say request administration (approve, decline, limits, auto-approve) stays in the web admin. The Android phone and TV apps show admins an approvals card and queue, and Approve, Decline and Retry on a request's detail page. This change removes request moderation from both apps.
Approach
The approvals screen and route, the hub's approvals card and My Requests entry, the detail page's moderation pills and decline dialog (phone and TV),
canModerate, and the admin request API calls and models are removed. Requesting, cancelling your own pending request and following a request's status are unchanged. A source test fails if the admin request endpoint or moderation types come back. FEATURES.md, README anddocs/requests-api-v2.mdsay administration is web-only.#27 asked whether Android should expose Requests and the Admin dashboard to match Apple. Requests already ship; this keeps request moderation out of both platforms, as the published criteria require.
#559 and #560 are stacked on this branch; merge this first. They both edit the Requests row of FEATURES.md, so whichever merges second needs a one-line rebase.
Validation
:shared,:androidAppand:androidTvAppunit tests: pass, exceptReflowStyleTest("line height flows from settings"), which fails the same way onmain.Evidence
Evidence: https://evidence.siloserver.org/r/silo-android/pr-558/
Risks
Admins who approved requests from the apps must use the web admin, which the published criteria already require.
Checklist
AI Disclosure
gh), Playwright, Xcodexcodebuild/simctl, Maestro, Android emulator/adbclaude-opus-5-5)