Skip to content

feat: implement session storage for tabs state management and optimiz…#994

Merged
MODSetter merged 1 commit into
devfrom
dev_mod
Mar 27, 2026
Merged

feat: implement session storage for tabs state management and optimiz…#994
MODSetter merged 1 commit into
devfrom
dev_mod

Conversation

@MODSetter

@MODSetter MODSetter commented Mar 27, 2026

Copy link
Copy Markdown
Owner

…e tab reset logic on search space change

Description

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR implements session storage persistence for tabs state management using Jotai's atomWithStorage utility, allowing tabs to survive page refreshes. It also optimizes the tab reset logic to prevent unnecessary resets on component mount by using a ref to track when the search space ID actually changes, ensuring tabs are only reset when users switch between different search spaces rather than on every render.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_web/atoms/tabs/tabs.atom.ts
2 surfsense_web/components/layout/providers/LayoutDataProvider.tsx

Need help? Join our Discord

Analyze latest changes

@vercel

vercel Bot commented Mar 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
surf-sense-frontend Ready Ready Preview, Comment Mar 27, 2026 10:21am

Request Review

@MODSetter MODSetter merged commit 52487c4 into dev Mar 27, 2026
6 of 8 checks passed

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on f263cf9..e47c786

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (2)

surfsense_web/atoms/tabs/tabs.atom.ts
surfsense_web/components/layout/providers/LayoutDataProvider.tsx

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on e47c786..e47c786

✨ No files to analyze

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review by RecurseML

🔍 Review performed on e47c786..e47c786

✨ No files to analyze

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