Skip to content

Shorten search key lifetime and trim indexed fields - #746

Merged
justinaskav merged 3 commits into
fix/authz-scopefrom
fix/search-keys
Nov 6, 2026
Merged

justinaskav merged 3 commits into
fix/authz-scopefrom
fix/search-keys

Conversation

@justinaskav

Copy link
Copy Markdown
Member

Search key lifetime, logout and indexed fields.

  • Scoped search keys last 15 minutes (cache 800 s), still capped at duty end; logout clears cached keys server-side and in the browser.
  • Users' pronouns are indexed only when shown.
  • Institution activity_status is excluded from search results for users without global institution read; the UI drops that facet/filter for them. (A client filter on the field is still possible; full separation would need a separate index.)
  • Integration test against real Typesense for pinned results with every key type (runs in CI).

Who made what: Codex wrote the change and tests; Claude reviewed it, fixed one fixture, and ran the tests.

Check by hand: a collection page left open past 15 minutes keeps searching; both logout flows; institution list as a baseline user and as a global admin.

Deploy: reindex users (search:reindex or the users collection) so hidden pronouns drop out. Rotating the admin parent search key afterwards (typesense:rotate-keys --delete-old) retires previously issued keys.

🤖 Generated with Claude Code

@justinaskav
justinaskav added this pull request to stack #747 November 6, 2026 20:35
@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 443 bytes (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
vusa-frontend-esm 7.84MB 443 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: vusa-frontend-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/AdminLayout-*.js 60 bytes 79.93kB 0.08%
assets/useAdminCollectionSearch-*.js 214 bytes 22.8kB 0.95%
assets/useAdminSearch-*.js -1.95kB 13.07kB -12.96%
assets/searchSession-*.js (New) 2.12kB 2.12kB 100.0% 🚀

Files in assets/AdminLayout-*.js:

  • ./resources/js/Composables/useLogout.ts → Total Size: 449 bytes

Files in assets/useAdminCollectionSearch-*.js:

  • ./resources/js/Features/Admin/AdminSearch/Composables/useAdminCollectionSearch.ts → Total Size: 12.18kB

Files in assets/searchSession-*.js:

  • ./resources/js/Features/Admin/AdminSearch/searchSession.ts → Total Size: 3.77kB

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@justinaskav
justinaskav removed this pull request from stack #747 November 6, 2026 20:46
@justinaskav
justinaskav added this pull request to stack #748 November 6, 2026 20:47
justinaskav and others added 3 commits November 6, 2026 22:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@justinaskav
justinaskav merged commit 0446af0 into dev Nov 6, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant