Skip to content

Conversation

@olivermrose
Copy link
Collaborator

@olivermrose olivermrose commented Dec 19, 2025

Adds an additional accounts field in preparation for #14

Copilot AI review requested due to automatic review settings December 19, 2025 06:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the codebase by separating internal/storage-related settings (user authentication data, lastJoined channel, pinned channels, and accounts) from user preferences into a dedicated storage store. This improves code organization by distinguishing between persistent user settings and application state/storage.

  • Creates a new storage store in src/lib/stores.ts with AccountUser interface
  • Migrates user, lastJoined, pinned, and accounts fields from settings to storage
  • Updates all references throughout the codebase to use the new storage store

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib/stores.ts Adds new storage store with AccountUser interface and Storage type containing user, accounts, lastJoined, and pinned fields
src/lib/settings.ts Removes internal storage fields (user, lastJoined, pinned) and StoredUser interface from Settings, keeping only user preference settings
src/routes/auth/logout/+page.ts Updates to use storage.state for clearing user and lastJoined data on logout
src/routes/auth/login/+page.svelte Updates to use storage.state for storing authenticated user data
src/routes/+layout.ts Updates authentication checks and token initialization to use storage.state.user
src/routes/(main)/+page.svelte Updates lastJoined channel handling to use storage, while maintaining settings import for user preferences
src/routes/(main)/+layout.svelte Updates user and pinned channels references to use storage.state
src/routes/(main)/channels/split/+page.svelte Updates lastJoined reset to use storage.state
src/lib/models/channel.svelte.ts Updates pinned status and lastJoined tracking to use storage.state
src/lib/menus/channel-menu.ts Updates pin/unpin channel actions to use storage.state.pinned
src/lib/components/ChannelList.svelte Updates pinned channel sorting and display to use storage.state.pinned

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@olivermrose olivermrose merged commit 7603322 into main Dec 19, 2025
3 checks passed
@olivermrose olivermrose deleted the refactor/storage branch December 19, 2025 06:20
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