Skip to content

Delete inactive clients/sessions#959

Merged
jmattheis merged 7 commits into
masterfrom
expiry
May 18, 2026
Merged

Delete inactive clients/sessions#959
jmattheis merged 7 commits into
masterfrom
expiry

Conversation

@jmattheis
Copy link
Copy Markdown
Member

This MR includes:

  • Add createdAt fields to all models
  • Add expiresAfterInactivitySeconds to client
  • Clean up inactive clients

fixes #943

@jmattheis jmattheis requested a review from a team as a code owner May 9, 2026 20:17
@jmattheis jmattheis changed the title Expiry Delete inactive clients/sessions May 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

❌ Patch coverage is 75.53191% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.90%. Comparing base (ec8ce07) to head (87db368).

Files with missing lines Patch % Lines
database/client.go 68.75% 5 Missing and 5 partials ⚠️
router/router.go 0.00% 7 Missing ⚠️
database/database.go 71.42% 2 Missing and 2 partials ⚠️
app.go 0.00% 1 Missing ⚠️
auth/authentication.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #959      +/-   ##
==========================================
- Coverage   75.01%   74.90%   -0.12%     
==========================================
  Files          61       62       +1     
  Lines        2886     2953      +67     
==========================================
+ Hits         2165     2212      +47     
- Misses        566      579      +13     
- Partials      155      162       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmattheis jmattheis mentioned this pull request May 9, 2026
8 tasks
Comment thread router/router.go
Comment thread ui/src/client/Clients.tsx Outdated
@eternal-flame-AD
Copy link
Copy Markdown
Member

Another option for this to work precisely is to memoize an expiresAt field updated along with lastUsed, and predicate all client selections with a condition.

Copy link
Copy Markdown
Member

@eternal-flame-AD eternal-flame-AD left a comment

Choose a reason for hiding this comment

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

lgtm!

@jmattheis jmattheis merged commit 5f167eb into master May 18, 2026
4 checks passed
@jmattheis jmattheis deleted the expiry branch May 18, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Periodically delete inactive client sessions

2 participants