Skip to content

core: delete old session after recreate#1173

Merged
undefined-moe merged 1 commit into
hydro-dev:masterfrom
renbaoshuo:del-session-after-logout
Jun 6, 2026
Merged

core: delete old session after recreate#1173
undefined-moe merged 1 commit into
hydro-dev:masterfrom
renbaoshuo:del-session-after-logout

Conversation

@renbaoshuo
Copy link
Copy Markdown
Contributor

@renbaoshuo renbaoshuo commented Jun 6, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved session management to properly clean up old session tokens when sessions are recreated, preventing orphaned session records from accumulating.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 6, 2026

Need an answer fast? Review this PR in Change Stack to ask focused questions about the PR or a changed range.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e468b1e1-f392-445e-a9dc-2182a8fd434b

📥 Commits

Reviewing files that changed from the base of the PR and between 3cc1325 and 8450390.

📒 Files selected for processing (1)
  • packages/hydrooj/src/service/layers/base.ts

Walkthrough

This PR adds a single cleanup operation to the session layer's recreation path. When a session is being recreated, the code now explicitly deletes the existing session token before assigning new session metadata and creating a fresh token. This prevents leaving an orphaned session record in the token store during the recreation process.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'core: delete old session after recreate' accurately summarizes the main change: deleting an old session token during the session recreation process.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/hydrooj/src/service/layers/base.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@undefined-moe undefined-moe merged commit 8d76be8 into hydro-dev:master Jun 6, 2026
6 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.

2 participants