Repository navigation
fix(auth): clear front-end stores on login and logout instead of Clear-Site-Data - #4932
Conversation
Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 5

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
860530a0-7d18-4658-9f02-a38b85420889
Files selected for processing: 22-
app/Http/Kernel.phpapp/Http/Middleware/ClearBrowserCache.phpapp/Listeners/ClearBrowserCacheOnAuthChange.phpapp/Providers/EventServiceProvider.phpdocs/specs/4-architecture/features/102-asset-endpoint-speedup/open-questions.mddocs/specs/4-architecture/features/102-asset-endpoint-speedup/plan.mddocs/specs/4-architecture/features/102-asset-endpoint-speedup/spec.mddocs/specs/4-architecture/features/102-asset-endpoint-speedup/tasks.mddocs/specs/4-architecture/knowledge-map.mddocs/specs/4-architecture/roadmap.mdresources/js/components.d.tsresources/js/composables/useClearViewerState.test.tsresources/js/composables/useClearViewerState.tsresources/js/services/thumb-asset-service.test.tsresources/js/services/thumb-asset-service.tsresources/js/v7/components/forms/auth/LoginForm.vueresources/js/v7/components/modals/WebauthnModal.vueresources/js/v7/menus/LeftMenu.vueresources/js/v8/components/forms/auth/LoginForm.vueresources/js/v8/components/modals/WebauthnModal.vueresources/js/v8/composables/useLogout.tstests/Feature_v2/AuthTest.php
Files with no reviewable changes: 5-
- app/Http/Kernel.php
- app/Http/Middleware/ClearBrowserCache.php
- app/Providers/EventServiceProvider.php
- tests/Feature_v2/AuthTest.php
- app/Listeners/ClearBrowserCacheOnAuthChange.php
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
-
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5b3781bd-3fcd-429c-89b5-be9d754b77cb
Files selected for processing: 6-
resources/js/components.d.tsresources/js/composables/contextMenus/contextMenu.tsresources/js/v7/components/forms/album/EmbedCodeDialog.vueresources/js/v8/components/forms/album/EmbedCodeDialog.vueresources/js/v8/composables/contextMenus/contextMenu.tsresources/js/v8/composables/spotlight/useSpotlightRemoteSearch.ts
Files skipped from review as they are similar to previous changes: 1-
- resources/js/components.d.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
-
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Reset SearchState during login cleanup. · useClearViewerState.ts:33-44
resources/js/composables/useClearViewerState.ts:33-44
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReset
SearchStateduring login cleanup.After a guest searches in the v8 search view, successful login calls
clearViewerState()but leavesSearchState.albumTilesV3andsearchTermunchanged. The search view renders those cached album tiles directly, so the new viewer can see results and rights-derived actions from the previous viewer without a new request.Suggested fix
import { useTimelineStore } from "@/stores/TimelineState"; +import { useSearchStore } from "@/stores/SearchState"; export function useClearViewerState() { // existing store declarations + const searchStore = useSearchStore(); function clearViewerState(): void { globalRightsStore.reset(); photoStore.reset(); photosStore.reset(); albumsStore.reset(); albumStore.reset(); timelineStore.reset(); + searchStore.reset(); userStore.setUser(undefined);
🔇 Additional comments: 1
docs/specs/4-architecture/knowledge-map.md-196-196: 1
196-196:Minor · Maintainability & Code Quality · Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Clarify the
ThumbAssetServicecleanup behavior.The parenthetical is grammatically incomplete. State that
clear()revokes URLs with no active holders, while a URL still rendered is revoked after its finalrelease(). This matches the implementation and FR-102-08. (github.com)

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c710ec70-6a6c-4412-8bf1-bfee4cd251fd
Files selected for processing: 12-
docs/specs/4-architecture/features/102-asset-endpoint-speedup/plan.mddocs/specs/4-architecture/features/102-asset-endpoint-speedup/spec.mddocs/specs/4-architecture/features/102-asset-endpoint-speedup/tasks.mddocs/specs/4-architecture/knowledge-map.mddocs/specs/4-architecture/roadmap.mdresources/js/composables/useClearViewerState.test.tsresources/js/composables/useClearViewerState.tsresources/js/stores/TimelineState.tsresources/js/v7/views/gallery-panels/Tag.vueresources/js/v7/views/gallery-panels/Timeline.vueresources/js/v8/views/gallery-panels/Tag.vueresources/js/v8/views/gallery-panels/Timeline.vue
Files skipped from review as they are similar to previous changes: 2-
- docs/specs/4-architecture/roadmap.md
- docs/specs/4-architecture/features/102-asset-endpoint-speedup/tasks.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
-
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
fix(auth): clear front-end stores on login and logout instead of Clear-Site-Data
Summary by CodeRabbit
New Features
Behavior Changes