Skip to content

fix(requests): remove request moderation from the phone and TV apps - #558

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/requests-no-native-admin
Oct 13, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/requests-no-native-admin

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

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 and docs/requests-api-v2.md say 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

  • Phone and Android TV emulators against a local server, signed in as an admin: no approvals card, queue, Approve, Decline or Retry; as a regular user, request, cancel and status work as before.
  • :shared, :androidApp and :androidTvApp unit tests: pass, except ReflowStyleTest ("line height flows from settings"), which fails the same way on main.

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

  • 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.

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

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 →

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5fed8492-071a-4a66-b1ca-fc94fc9d594d
📥 Commits

Reviewing files that changed from the base of the PR and between 55b427d and cb9ffa6.

📒 Files selected for processing (2)
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt
  • shared/src/androidUnitTest/kotlin/org/siloserver/silo/network/api/NoNativeRequestModerationSourceTest.kt

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b029c58d-2cb9-4582-9699-88f8620e6427
📥 Commits

Reviewing files that changed from the base of the PR and between 726684d and 55b427d.

📒 Files selected for processing (34)
  • AGENTS.md
  • FEATURES.md
  • README.md
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/requests/RequestRouter.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/requests/RequestUi.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/di/AndroidModule.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/Routes.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/MyRequestsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestApprovalsScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestComponents.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestDetailScreen.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestRows.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestsScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/di/AndroidTvModule.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/requests/TvRequestComponents.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/requests/TvRequestDetailScreen.kt
  • androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/requests/TvRequestsPage.kt
  • shared/src/androidUnitTest/kotlin/org/siloserver/silo/network/api/NoNativeRequestModerationSourceTest.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/feature/RequestsFeatureStore.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/request/RequestDisplayState.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/request/RequestModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/request/RequestMutations.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/api/RequestsApi.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/RequestDetailCache.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/RequestsRepository.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/RequestApprovalsViewModel.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/RequestDetailViewModel.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/RequestsViewModels.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/feature/RequestsFeatureStoreTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/network/apiv2/RequestsV2Test.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/repository/RequestsRepositoryTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/viewmodel/RequestDetailStatusTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/viewmodel/RequestsViewModelTest.kt
💤 Files with no reviewable changes (13)
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/Routes.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/repository/RequestsRepositoryTest.kt
  • android-shared/src/androidMain/kotlin/org/siloserver/silo/common/requests/RequestUi.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/network/api/RequestsApi.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/network/apiv2/RequestsV2Test.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/RequestApprovalsScreen.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/RequestsViewModels.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/RequestApprovalsViewModel.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/model/request/RequestModels.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/model/feature/RequestsFeatureStoreTest.kt
  • shared/src/commonTest/kotlin/org/siloserver/silo/viewmodel/RequestsViewModelTest.kt
  • androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/AppNavigation.kt
  • shared/src/commonMain/kotlin/org/siloserver/silo/repository/RequestsRepository.kt

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

Walkthrough

Android request moderation has been removed from the shared API and repository, view models, and Android app and TV screens. Native request flows retain request submission, cancellation of a user’s own pending request, and status display. Documentation now identifies request administration as web-admin-only.

Changes

Native request scope

Layer / File(s) Summary
Shared moderation contracts and repository flows
shared/src/commonMain/kotlin/org/siloserver/silo/model/..., shared/src/commonMain/kotlin/org/siloserver/silo/network/api/RequestsApi.kt, shared/src/commonMain/kotlin/org/siloserver/silo/repository/..., android-shared/src/androidMain/kotlin/org/siloserver/silo/common/requests/..., shared/src/commonTest/kotlin/..., shared/src/androidUnitTest/kotlin/..., AGENTS.md, FEATURES.md, README.md
The shared request API, models, repository, and detail cache no longer provide moderation operations or records. Feature state tracks native Requests enablement only. Tests and documentation reflect the removal of native moderation.
Shared request view models
shared/src/commonMain/kotlin/org/siloserver/silo/viewmodel/..., shared/src/commonTest/kotlin/org/siloserver/silo/viewmodel/...
The approval-queue view model and moderation state were removed. Request detail and hub view models now use the user’s request records and create or cancel updates.
Android app Requests screens
androidApp/src/androidMain/kotlin/org/siloserver/silo/android/di/AndroidModule.kt, androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/navigation/..., androidApp/src/androidMain/kotlin/org/siloserver/silo/android/ui/screens/requests/...
Approval navigation, queue screens, summary cards, and moderation controls were removed. Request detail and My Requests retain user request actions and status displays.
Android TV Requests screens
androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/di/AndroidTvModule.kt, androidTvApp/src/androidMain/kotlin/org/siloserver/silo/tv/ui/screens/requests/...
The TV Requests page and detail screen no longer load approval queues or provide approve, decline, or retry actions. Cancellation remains available for eligible user requests.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: quick104

Merge Risk: ⚪ Minimal · up to 55b42

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 · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 32.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 18 files. (3 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
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.
Title check Passed The title clearly and concisely states that request moderation is removed from the phone and TV apps, which matches the main change.
Description check Passed The description directly explains the removal of request moderation from the Android phone and TV apps, the preserved user request flows, validation results, and related risks.
Full details: Docstring Coverage

Explanation

Docstring coverage is 32.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 18 files. (3 skipped: 3 unsupported.)

✨ 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 bug Something isn't working needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish labels Oct 12, 2026
data object Requests : Route("requests")
data object MyRequests : Route("requests/mine")
data object RequestApprovals : Route("requests/approvals")
data class RequestDetail(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug critical

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.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

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 merged commit c73770f into Silo-Server:main Oct 13, 2026
9 checks passed
Quick104 added a commit to Rhainland/silo-android that referenced this pull request Oct 13, 2026
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]>
neurekadev pushed a commit to neurekadev/silo-android that referenced this pull request Oct 14, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-review Needs maintainer review to resolve uncertain classification, scope, or changed evidence. priority: P2 Limited scope, workaround exists, or polish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants