-
Notifications
You must be signed in to change notification settings - Fork 88
fix(widget): honour documented open() deep-links #531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c960f25
fix(widget): honour documented open() deep-links
mortondev abe2c02
fix(widget): resolve boards after identify and article TypeIDs
mortondev f167710
fix(widget): load articles like posts and auth identity feeds
mortondev 9b914d5
fix(widget): isolate open() feeds from identity and board filter drift
mortondev f2648c1
fix(widget): honour identity and locale on open() detail views
mortondev fccbeef
fix(widget): isolate open() cache, auth changelog list, and article l…
mortondev 3d668c5
refactor(widget): share query-key and similar-search helpers
mortondev b02c8d9
fix(widget): clear identity placeholders and attach help/changelog OTT
mortondev 54416d9
fix(widget): auth help search, localize portal article URLs, drop los…
mortondev cf211e0
fix(widget): abort stale help searches and reset compose after logout
mortondev 2a54eb2
fix(widget): auth Ask AI and leave gated help collections after logout
mortondev 9a1a768
fix(widget): type the Ask AI fetch stub so header assertions typecheck
mortondev 2683dae
fix(widget): keep manual compose boards and drop stale changelog filters
mortondev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
37 changes: 37 additions & 0 deletions
37
apps/web/src/components/widget/__tests__/widget-changelog-query.test.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import { describe, expect, it } from 'vitest' | ||
| import { INITIAL_SESSION_VERSION } from '@/lib/client/hooks/use-widget-vote' | ||
| import { shouldClearUnavailableChangelogCategory } from '../widget-changelog-query' | ||
|
|
||
| describe('shouldClearUnavailableChangelogCategory', () => { | ||
| const ready = { sessionVersion: 1, listReady: true, stillLooking: false } | ||
|
|
||
| it('clears a filter the current session feed no longer contains', () => { | ||
| expect(shouldClearUnavailableChangelogCategory('secret', [{ id: 'public' }], ready)).toBe(true) | ||
| expect(shouldClearUnavailableChangelogCategory('public', [{ id: 'public' }], ready)).toBe(false) | ||
| expect(shouldClearUnavailableChangelogCategory(null, [{ id: 'public' }], ready)).toBe(false) | ||
| }) | ||
|
|
||
| it('waits until the feed is in and lookahead has finished', () => { | ||
| expect( | ||
| shouldClearUnavailableChangelogCategory('secret', [], { | ||
| ...ready, | ||
| listReady: false, | ||
| }) | ||
| ).toBe(false) | ||
| expect( | ||
| shouldClearUnavailableChangelogCategory('secret', [], { | ||
| ...ready, | ||
| stillLooking: true, | ||
| }) | ||
| ).toBe(false) | ||
| }) | ||
|
|
||
| it('does not bounce on the anonymous first paint', () => { | ||
| expect( | ||
| shouldClearUnavailableChangelogCategory('secret', [], { | ||
| ...ready, | ||
| sessionVersion: INITIAL_SESSION_VERSION, | ||
| }) | ||
| ).toBe(false) | ||
| }) | ||
| }) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.