[PR #832] [MERGED] feat: display all accessible oidc clients in the dashboard #603

Closed
opened 2025-10-09 16:53:32 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/832
Author: @stonith404
Created: 8/14/2025
Status: Merged
Merged: 8/17/2025
Merged by: @stonith404

Base: mainHead: feat/display-all-accessible-apps


📝 Commits (10+)

  • 6ed2702 feat: display all accessible oidc clients in the dashboard
  • 293b766 fix: race condition of date fns locale
  • a6e1841 fix: update swagger notation for api docs
  • d0d548f fix e2e tests to check for full client count
  • a204368 add rel='noopener noreferrer' to button
  • 7dbccfc add safer hostname extracting if the client was created via the api
  • 8605ce8 use transaction for multiple read queries
  • f163554 remove safehostname
  • d1a5e0a improve sort direction handling
  • d8fb954 add test for not accessible client

📊 Changes

28 files changed (+306 additions, -110 deletions)

View changed files

📝 backend/internal/controller/oidc_controller.go (+39 -6)
📝 backend/internal/dto/oidc_dto.go (+5 -0)
📝 backend/internal/model/oidc.go (+4 -3)
📝 backend/internal/service/oidc_service.go (+76 -2)
📝 backend/internal/service/user_group_service.go (+1 -2)
📝 backend/internal/utils/paging_util.go (+15 -3)
📝 frontend/messages/en.json (+2 -1)
📝 frontend/package.json (+1 -0)
📝 frontend/src/lib/services/oidc-service.ts (+3 -9)
📝 frontend/src/lib/stores/user-store.ts (+2 -2)
📝 frontend/src/lib/types/oidc.type.ts (+2 -3)
📝 frontend/src/lib/utils/locale.util.ts (+21 -5)
📝 frontend/src/routes/+layout.svelte (+0 -10)
📝 frontend/src/routes/+layout.ts (+10 -0)
📝 frontend/src/routes/authorize/+page.svelte (+1 -1)
📝 frontend/src/routes/device/+page.svelte (+1 -1)
📝 frontend/src/routes/login/+page.svelte (+1 -1)
📝 frontend/src/routes/login/alternative/code/+page.svelte (+1 -1)
📝 frontend/src/routes/settings/account/locale-picker.svelte (+1 -1)
📝 frontend/src/routes/settings/apps/+page.svelte (+17 -14)

...and 8 more files

📄 Description

The "My Apps" dashboard now shows all OIDC clients that the user can access, instead of only displaying the ones they have already signed into.

Additionally, the responsiveness of the cards has been improved, and the cards now display when the user last signed into the corresponding clients.

Issues Fixed by this PR

Fixes #828
Fixes #823
Fixes #828

Summary by CodeRabbit

  • New Features
    • “Apps” page now lists all accessible apps, showing last signed-in time with tooltip and improved responsive cards.
    • Added localized message: “Last signed in {time} ago.”
  • Bug Fixes
    • More reliable user/locale updates across login, signup, authorize, and device flows by awaiting state changes, reducing race conditions and navigation issues.
  • Refactor
    • Terminology and endpoints updated from “authorized clients” to “accessible clients.”
  • Chores
    • Added date formatting library for relative time display.

🔄 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/pocket-id/pocket-id/pull/832 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 8/14/2025 **Status:** ✅ Merged **Merged:** 8/17/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `feat/display-all-accessible-apps` --- ### 📝 Commits (10+) - [`6ed2702`](https://github.com/pocket-id/pocket-id/commit/6ed27021c8be0462b854f410adc8e05730a16f16) feat: display all accessible oidc clients in the dashboard - [`293b766`](https://github.com/pocket-id/pocket-id/commit/293b7661aa2de65d0308475847d66a7066883be6) fix: race condition of date fns locale - [`a6e1841`](https://github.com/pocket-id/pocket-id/commit/a6e1841c5ba8af535db09154d60a44149cf01aeb) fix: update swagger notation for api docs - [`d0d548f`](https://github.com/pocket-id/pocket-id/commit/d0d548f0b0bfcc613c667ae059604f825f278fda) fix e2e tests to check for full client count - [`a204368`](https://github.com/pocket-id/pocket-id/commit/a204368605ffd4102ff1d467ab9c497ee2c160f6) add rel='noopener noreferrer' to button - [`7dbccfc`](https://github.com/pocket-id/pocket-id/commit/7dbccfcc373a9e48cb765780da4244fa196100d0) add safer hostname extracting if the client was created via the api - [`8605ce8`](https://github.com/pocket-id/pocket-id/commit/8605ce813ca858c5ea962a8c46d5498035afc3d3) use transaction for multiple read queries - [`f163554`](https://github.com/pocket-id/pocket-id/commit/f1635544b5a0230f95835225f0d896a609f12bd3) remove safehostname - [`d1a5e0a`](https://github.com/pocket-id/pocket-id/commit/d1a5e0ac0f0be75f24f9d10bc134c07749d655af) improve sort direction handling - [`d8fb954`](https://github.com/pocket-id/pocket-id/commit/d8fb954cf1e1fee694e1a71b73664d6860e7ebbe) add test for not accessible client ### 📊 Changes **28 files changed** (+306 additions, -110 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/controller/oidc_controller.go` (+39 -6) 📝 `backend/internal/dto/oidc_dto.go` (+5 -0) 📝 `backend/internal/model/oidc.go` (+4 -3) 📝 `backend/internal/service/oidc_service.go` (+76 -2) 📝 `backend/internal/service/user_group_service.go` (+1 -2) 📝 `backend/internal/utils/paging_util.go` (+15 -3) 📝 `frontend/messages/en.json` (+2 -1) 📝 `frontend/package.json` (+1 -0) 📝 `frontend/src/lib/services/oidc-service.ts` (+3 -9) 📝 `frontend/src/lib/stores/user-store.ts` (+2 -2) 📝 `frontend/src/lib/types/oidc.type.ts` (+2 -3) 📝 `frontend/src/lib/utils/locale.util.ts` (+21 -5) 📝 `frontend/src/routes/+layout.svelte` (+0 -10) 📝 `frontend/src/routes/+layout.ts` (+10 -0) 📝 `frontend/src/routes/authorize/+page.svelte` (+1 -1) 📝 `frontend/src/routes/device/+page.svelte` (+1 -1) 📝 `frontend/src/routes/login/+page.svelte` (+1 -1) 📝 `frontend/src/routes/login/alternative/code/+page.svelte` (+1 -1) 📝 `frontend/src/routes/settings/account/locale-picker.svelte` (+1 -1) 📝 `frontend/src/routes/settings/apps/+page.svelte` (+17 -14) _...and 8 more files_ </details> ### 📄 Description The "My Apps" dashboard now shows all OIDC clients that the user can access, instead of only displaying the ones they have already signed into. Additionally, the responsiveness of the cards has been improved, and the cards now display when the user last signed into the corresponding clients. <details> <summary>Issues Fixed by this PR</summary> Fixes #828 Fixes #823 Fixes #828 </details> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - “Apps” page now lists all accessible apps, showing last signed-in time with tooltip and improved responsive cards. - Added localized message: “Last signed in {time} ago.” - Bug Fixes - More reliable user/locale updates across login, signup, authorize, and device flows by awaiting state changes, reducing race conditions and navigation issues. - Refactor - Terminology and endpoints updated from “authorized clients” to “accessible clients.” - Chores - Added date formatting library for relative time display. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 2025-10-09 16:53:33 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-2#603