Skip to content

fix(sessions): explain how to override options at runtime#13784

Merged
ArmandPhilippot merged 15 commits into
mainfrom
armand/fix-session-config
May 5, 2026
Merged

fix(sessions): explain how to override options at runtime#13784
ArmandPhilippot merged 15 commits into
mainfrom
armand/fix-session-config

Conversation

@ArmandPhilippot
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot commented Apr 21, 2026

Description (required)

  • Updates guides/sessions to show how to override driver options at runtime.

    I took inspiration from the code snippet provided by Florian in Sessions drivers option defined at runtime roadmap#1214 (comment) with some minor changes:

    • the example was mixing .ts and .js... not sure if this was intentional
    • I guess this was written before sessionDrivers stabilization and we don't need to use unstorage directly
  • Updates configuration-reference to:

    • replace the deprecated usage in "Session Options"
    • add more links to the session guide to emphasize that runtime variables may require adjustment
    • reorganize a bit the "Session Options" section

Note that I updated configuration-reference here to check and validate this is what we want, but we'll need to do the same changes in the core repo.

Related issues & labels (optional)

@ArmandPhilippot ArmandPhilippot added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Apr 21, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit c4a5320
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/69f9815e7478b50008eb51b6
😎 Deploy Preview https://deploy-preview-13784--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Apr 21, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/sessions.mdx Source changed, localizations will be marked as outdated.
en/reference/configuration-reference.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Copy Markdown
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

Unstorage was used on purpose! The entrypoint must return a SessionDriver which is the actual implementation

@ArmandPhilippot
Copy link
Copy Markdown
Member Author

Thanks! I shouldn't have made assumptions. 😅

Then, I'm not sure the previous structure was good enough. Because we need an external package, I moved this in a separate section and I introduced <Steps /> for the example.

Comment thread src/content/docs/en/guides/sessions.mdx Outdated
Comment thread src/content/docs/en/reference/configuration-reference.mdx Outdated
Comment thread src/content/docs/en/reference/configuration-reference.mdx
Copy link
Copy Markdown
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Copy Markdown
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

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

Golod work @ArmandPhilippot, just two small nits from me

Comment thread src/content/docs/en/reference/configuration-reference.mdx Outdated
Comment thread src/content/docs/en/guides/sessions.mdx Outdated
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
@ArmandPhilippot ArmandPhilippot merged commit aad4d63 into main May 5, 2026
10 checks passed
@ArmandPhilippot ArmandPhilippot deleted the armand/fix-session-config branch May 5, 2026 06:15
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify sessions options behavior

4 participants