Skip to content

Send clientIdentifier with asset list and config requests - #688

Merged
JW-CH merged 2 commits into
immichFrame:mainfrom
dschmidt:feat/send-client-identifier
Aug 14, 2026
Merged

Send clientIdentifier with asset list and config requests#688
JW-CH merged 2 commits into
immichFrame:mainfrom
dschmidt:feat/send-client-identifier

Conversation

@dschmidt

@dschmidt dschmidt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

The web client sends the clientIdentifier on asset detail, image, video, weather and calendar requests, but not on GET /api/Asset and GET /api/Config. Both endpoints already accept the parameter.

This passes the persisted identifier on both calls. The config load also reads the ?client= URL parameter directly, since it runs before the home page persists it, so the identifier is correct on the very first visit.

No server behavior changes, the parameter is currently only used for logging.

Summary by CodeRabbit

  • Bug Fixes
    • Improved asset loading by preserving the configured client identifier across page navigation.
    • Configuration and asset requests now correctly honor an optional client specified in the page URL.
    • Added a fallback to the previously persisted client identifier when no URL parameter is provided.
    • Ensured client selection remains consistent between initial configuration loading and subsequent asset requests.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 05b336d0-680c-45ee-ba7b-cdafec8a59c0

📥 Commits

Reviewing files that changed from the base of the PR and between dd4f3ac and e973c01.

📒 Files selected for processing (2)
  • immichFrame.Web/src/lib/components/home-page/home-page.svelte
  • immichFrame.Web/src/routes/+page.ts
💤 Files with no reviewable changes (1)
  • immichFrame.Web/src/lib/components/home-page/home-page.svelte
🚧 Files skipped from review as they are similar to previous changes (1)
  • immichFrame.Web/src/routes/+page.ts

📝 Walkthrough

Walkthrough

The page load handler resolves a client identifier from the URL or persisted store. Configuration and asset requests now receive that identifier.

Changes

Client Identifier Flow

Layer / File(s) Summary
Resolve client identifier
immichFrame.Web/src/routes/+page.ts
The typed page load handler reads the optional client query parameter, persists it when present, and passes the stored identifier to api.getConfig.
Propagate identifier to asset retrieval
immichFrame.Web/src/lib/components/home-page/home-page.svelte
loadAssets passes the persisted client identifier to api.getAssets.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to e973c

This change adds the client identifier to asset-list and configuration requests, including the first visit path, without changing server behavior. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: sending the client identifier with asset list and config requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@immichFrame.Web/src/routes/`+page.ts:
- Line 9: Update the clientIdentifier initialization in the page load flow to
treat an empty or missing client query parameter as absent, falling back to
get(clientIdentifierStore) instead of preserving ''.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7064fd4b-f004-403c-a920-f26f9e725f2c

📥 Commits

Reviewing files that changed from the base of the PR and between 319affe and dd4f3ac.

📒 Files selected for processing (2)
  • immichFrame.Web/src/lib/components/home-page/home-page.svelte
  • immichFrame.Web/src/routes/+page.ts

Comment thread immichFrame.Web/src/routes/+page.ts Outdated
@JW-CH JW-CH added the enhancement New feature or request label Aug 14, 2026
@JW-CH
JW-CH merged commit 793d00a into immichFrame:main Aug 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants