Repository navigation
fix(web): send the device name and platform on player requests - #4555
Conversation
The web player's requests carried X-Silo-Device-Id but not the X-Silo-Device-Name and X-Silo-Device-Platform headers the rest of the web app sends, so a web play reached the admin session list and history with an empty platform. The player config now supplies the app's device header set instead of only the id. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 3 minutes. View limit details
|
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:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryReviewed head: No findings. The web player now sends the same device headers as the rest of the web app: What I checked:
Remaining for maintainers: the live sandbox check in the description ran on a combined branch that also carried two other changes, not this head alone. The mocked check above covers the request side, and the server side is unchanged. Validated features: the PR names #1206 C1 and #1207 C1. Neither case has a recorded result yet, so no passed case is at risk. The change adds a platform to web session rows and leaves the rest of the row as it was. User manual: unaffected. No siloserver.org page describes the session's device platform. Other clients: Apple, Android, and Roku already send these headers. Jellyfin plays don't record a declared platform, as the API docs say, so jellycompat needs nothing. Fit: 9/10 · Readiness: 8/10 — conditional Fit: the client declares its own platform, which is what the session contract documents, and the player reuses the web app's existing detector instead of adding a second one. Readiness: the code is sound, and the one condition is a live check on this exact head. Review by Claude Code (claude-opus-5-5) in T3 Code, with an adversarial pass by Codex (gpt-6.2-sol), run for the maintainer. |
Problem
Related issue: N/A
Validation tasks: reaches #1206 C1 and #1207 C1 (session rows for web plays gain a platform; nothing else on the row changes)
Other clients: Apple N/A (already sends the header from its shared request layer); Android N/A (already sends it from its auth interceptor); Roku N/A (already sends
roku)Admin session rows and playback history show an empty
device_platformfor plays from the web app, while the admin devices list shows the same browser as, for example, "macOS Web". A developer integrating a third-party monitor reported the mismatch.The web player's requests now carry the same device headers as the rest of the web app.
Approach
The server reads the platform from the playback start request. The web app's ordinary API calls send
X-Silo-Device-NameandX-Silo-Device-Platform, which is where the devices list gets them, but the player builds its own request headers and sent onlyX-Silo-Device-Id.The player's configuration now takes the web app's existing device-header function in place of a device-ID getter, so there is one detector and both paths send the same values. No server change: the session row documents
device_platformas what the client declared, so a server-side lookup would contradict it.Validation
admin:monitor:readkey: a play from this web build shows"device_platform": "Linux Web"on the live session row and in playback history; a play from the base commit's web app showsnullon both. That run used the implementer's combined branch, which also carried two other changes now in separate pull requests.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-4555/
Risks
None identified. Every player request now carries three more short headers.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Send device name and platform headers on web player requests
Replaces
getDeviceIdwithgetDeviceHeadersin thePlayerConfiginterface, so player requests now include device ID, device name, device platform, and web client-family headers instead of only the device ID. The audiobook and watch player providers use the exported helper from client.ts, and player-fetch.ts merges all returned headers into the request header map. Test fixtures are updated to the new callback shape.playerRequestHeaders, configured header values now replace existing values on name collision;PlayerConfigimplementers outside the repo must migrate fromgetDeviceIdtogetDeviceHeaders.Macroscope summarized 6f2d6d7.