[PR #16311] [CLOSED] refactor(web): Improve Compatibility by Switching Frontend to Hash Routing #14836

Closed
opened 2026-02-05 15:38:43 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/16311
Author: @Boc-chi-no
Created: 2/25/2025
Status: Closed

Base: mainHead: main


📝 Commits (6)

  • 2693c8f [U] Change the frontend routing mode to Hash routing
  • b4a0605 Fix ESlint errors
  • e6c4c43 Fix some unit tests
  • 08f9658 Merge branch 'main' into main
  • 08de9f4 Removed unused imports
  • 835d59d Merge branch 'immich-app:main' into main

📊 Changes

49 files changed (+204 additions, -124 deletions)

View changed files

📝 open-api/immich-openapi-specs.json (+1 -1)
📝 open-api/typescript-sdk/src/fetch-client.ts (+2 -2)
📝 web/eslint.config.mjs (+1 -0)
📝 web/package.json (+2 -2)
web/replace-assets.js (+41 -0)
📝 web/src/app.html (+8 -8)
📝 web/src/lib/components/admin-page/jobs/storage-migration-description.svelte (+1 -1)
📝 web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte (+1 -1)
📝 web/src/lib/components/asset-viewer/detail-panel-tags.svelte (+1 -1)
📝 web/src/lib/components/asset-viewer/detail-panel.svelte (+8 -8)
📝 web/src/lib/components/error.svelte (+1 -1)
📝 web/src/lib/components/faces-page/merge-face-selector.svelte (+1 -1)
📝 web/src/lib/components/faces-page/people-card.svelte (+1 -1)
📝 web/src/lib/components/memory-page/memory-viewer.svelte (+5 -4)
📝 web/src/lib/components/photos-page/memory-lane.svelte (+1 -1)
📝 web/src/lib/components/places-page/places-card-group.svelte (+1 -1)
📝 web/src/lib/components/shared-components/immich-logo-small-link.svelte (+1 -1)
📝 web/src/lib/components/shared-components/map/map.svelte (+22 -0)
📝 web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte (+1 -1)
📝 web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte (+1 -1)

...and 29 more files

📄 Description

Description

Changed the frontend project to use hash-based routing and modified the default API path. Additionally, the map component has been updated to support hash routing compatibility.
This improves the project's compatibility by allowing users to configure sub-paths via reverse proxy without additional setup. While we still recommend using subdomains, offering users more options is beneficial.
This change also resolves the issue: [Feature] Support base url on the web app #1679

How Has This Been Tested?

Since the path changes affected the entire functionality, I tested each feature, including:

  • Login
  • Sign out
  • Photos
  • Explore
  • Map
  • Sharing
  • Create share link
  • Settings

All features have been verified to work correctly.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/16311 **Author:** [@Boc-chi-no](https://github.com/Boc-chi-no) **Created:** 2/25/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (6) - [`2693c8f`](https://github.com/immich-app/immich/commit/2693c8f6ed08b8ab0a1109c49d2cafe256e228fe) [U] Change the frontend routing mode to Hash routing - [`b4a0605`](https://github.com/immich-app/immich/commit/b4a0605990255974b16318da43a5b36605300dcf) Fix ESlint errors - [`e6c4c43`](https://github.com/immich-app/immich/commit/e6c4c431977c427c7fc68d545a8d1bfb18286ffe) Fix some unit tests - [`08f9658`](https://github.com/immich-app/immich/commit/08f96587cb73c169e5b91c41a7451d7a73341a98) Merge branch 'main' into main - [`08de9f4`](https://github.com/immich-app/immich/commit/08de9f4accf60c0c28fdbc4acaf7f42321aad605) Removed unused imports - [`835d59d`](https://github.com/immich-app/immich/commit/835d59dfb4ac9f06495b1bc183f04827106d5acd) Merge branch 'immich-app:main' into main ### 📊 Changes **49 files changed** (+204 additions, -124 deletions) <details> <summary>View changed files</summary> 📝 `open-api/immich-openapi-specs.json` (+1 -1) 📝 `open-api/typescript-sdk/src/fetch-client.ts` (+2 -2) 📝 `web/eslint.config.mjs` (+1 -0) 📝 `web/package.json` (+2 -2) ➕ `web/replace-assets.js` (+41 -0) 📝 `web/src/app.html` (+8 -8) 📝 `web/src/lib/components/admin-page/jobs/storage-migration-description.svelte` (+1 -1) 📝 `web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte` (+1 -1) 📝 `web/src/lib/components/asset-viewer/detail-panel-tags.svelte` (+1 -1) 📝 `web/src/lib/components/asset-viewer/detail-panel.svelte` (+8 -8) 📝 `web/src/lib/components/error.svelte` (+1 -1) 📝 `web/src/lib/components/faces-page/merge-face-selector.svelte` (+1 -1) 📝 `web/src/lib/components/faces-page/people-card.svelte` (+1 -1) 📝 `web/src/lib/components/memory-page/memory-viewer.svelte` (+5 -4) 📝 `web/src/lib/components/photos-page/memory-lane.svelte` (+1 -1) 📝 `web/src/lib/components/places-page/places-card-group.svelte` (+1 -1) 📝 `web/src/lib/components/shared-components/immich-logo-small-link.svelte` (+1 -1) 📝 `web/src/lib/components/shared-components/map/map.svelte` (+22 -0) 📝 `web/src/lib/components/shared-components/navigation-bar/account-info-panel.svelte` (+1 -1) 📝 `web/src/lib/components/shared-components/navigation-bar/navigation-bar.svelte` (+1 -1) _...and 29 more files_ </details> ### 📄 Description ## Description Changed the frontend project to use hash-based routing and modified the default API path. Additionally, the map component has been updated to support hash routing compatibility. This improves the project's compatibility by allowing users to configure sub-paths via reverse proxy without additional setup. While we still recommend using subdomains, offering users more options is beneficial. This change also resolves the issue: [Feature] Support base url on the web app #1679 ## How Has This Been Tested? Since the path changes affected the entire functionality, I tested each feature, including: - Login - Sign out - Photos - Explore - Map - Sharing - Create share link - Settings All features have been verified to work correctly. ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation if applicable - [x] I have no unrelated changes in the PR. - [x] I have confirmed that any new dependencies are strictly necessary. - [ ] I have written tests for new code (if applicable) - [x] I have followed naming conventions/patterns in the surrounding code - [x] All code in `src/services` uses repositories implementations for database calls, filesystem operations, etc. - [x] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services`) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 15:38:43 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#14836