Fix empty board loading state and browser P2P patch (#1175)

* fix(board): show loaded empty boards

* fix(p2p): patch browser hooks runtime

* fix(board): stop flash loading for explicit empty boards

* fix(board): wait for feed on preloaded empty pages
This commit is contained in:
Tommaso Casaburi
2026-06-18 18:54:48 +07:00
committed by GitHub
parent 9896c4400b
commit eb47214f08
9 changed files with 821 additions and 240 deletions
@@ -61,6 +61,46 @@ describe('getRawBoardThreadState', () => {
).toBe(true);
});
it('treats explicit empty page CIDs as a fully loaded empty board', () => {
const community = {
posts: {
pageCids: {},
pages: {},
},
updatedAt: 1781773422,
} as Community;
expect(
getRawBoardThreadState({
accountId: undefined,
communitiesPages: {} as CommunitiesPages,
community,
sortType: 'active',
}),
).toMatchObject({
isFullyLoaded: true,
rootThreadCids: new Set<string>(),
});
});
it('does not treat placeholder empty page CIDs as fully loaded', () => {
const community = {
posts: {
pageCids: {},
pages: {},
},
} as Community;
expect(
getRawBoardThreadState({
accountId: undefined,
communitiesPages: {} as CommunitiesPages,
community,
sortType: 'active',
}).isFullyLoaded,
).toBe(false);
});
it('walks stored board pages without importing side-effectful stores', () => {
const community = {
posts: {