Repository navigation
Refactor authentication and improve discussion loading logic - #7
Merged
Merged
Conversation
feat: modify discussion body type to be optional for excerpts and articles refactor: consolidate loading of categories, viewer permissions, and home feed into a single overview function fix: adjust page loading logic to utilize shared home feed data feat: implement caching strategies for discussion loading and user-specific data fix: enhance comment posting to update discussion state without full refetch test: add comprehensive tests for cache functionality and user scoping test: update tests to reflect changes in token and state key usage test: ensure UI tests validate new overview loading logic and theme persistence chore: update vitest configuration to include JSON summary reporting
🧪 Test coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a stale-while-revalidate (SWR) cache for GraphQL responses, adds a test coverage summary comment to pull requests, and improves configurability and efficiency of forum data fetching. It also refines several naming and configuration conventions for consistency. The most important changes are grouped and summarized below:
Caching and Data Fetching Improvements:
src/lib/cache.tsfor GraphQL data, with user-scoping, versioning, TTL, and quota management. This enables instant page loads from localStorage and background revalidation, configurable via the newcachesection inforum.config.ts. [1] [2] [3]src/lib/github/api.tsto load categories, user permissions, and the first page of discussions in a single request (getOverview), reducing load time and redundant requests. [1] [2]Configuration and Feature Flags:
listExcerptsto thecontentconfig, allowing forums to disable body excerpts in discussion lists for smaller payloads; updated related logic and documentation. (Fc493ad4L91R91, [1] [2]cacheconfig section withenabledandttlSecondsoptions for controlling the new SWR cache. [1] [2] [3]CI and Developer Experience:
Consistency and Naming:
gf:todk:across theme storage, article markers, and sign-in token fields for clarity and branding consistency. [1] [2] [3] [4]Component and API Improvements:
CommentCard.svelteby returning the created reply object to the parent component, enabling immediate UI updates. [1] [2] [3]Let me know if you'd like a deeper dive into any specific change!