-
Notifications
You must be signed in to change notification settings - Fork 7
Fix resource page panel & comments issues #182
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
Conversation
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
- Create resource-page-common.tsx with unified rendering logic - ResourcePage takes only docId, calls useResource() internally - SiteHeader renders even on error states (not-found, tombstone, etc) - Desktop uses desktop-resource.tsx wrapper - Web routes wrap ResourcePage with WebSiteProvider - Backup legacy files as *-legacy-document.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace JS measurement for Feed text with CSS media queries (hidden lg:inline) - Add WebResourcePage wrapper for web-specific HypermediaHostBanner - Show banner when viewing content from different site than host Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Prefetch was using docId with version=null, but returned id had document.version - query keys didn't match so useResource couldn't find hydrated data - Create finalId with document.version before prefetching - Remove initialDocument prop hack from ResourcePage/WebResourcePage - Add SSR integration tests verifying React Query hydration - Add path aliases to vitest config for @shm/* packages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
useMedia was reading window.matchMedia during useState init on client, causing hydration mismatch when media.gtSm differed from SSR (false). React threw away SSR HTML and re-rendered, causing visible flash. Fix: Always init false, update via useEffect after hydration. Also fix useResponsiveItems to not clear items when container not ready. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add createDocumentNavRoute() utility to convert URL → NavRoute - Add initialRoute prop to WebSiteProvider for nav context - ResourcePage uses useNavRoute() for active view (works on both platforms) - Add DocumentTools tab bar with content/activity/discussions/directory/collaborators - MainContent switches view based on route key Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Uses IntersectionObserver to detect when tools scroll past viewport, then applies sticky positioning with shadow and reduced padding. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wrapper div broke sticky positioning. Now sentinel provides h-3 spacing and sticky div is direct scroll area child. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- useNavigate() now uses openRoute from context (URL sync on web) - Delete useOpenRoute() and useReplace() - Migrate all usages to useNavigate() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…scroll - PageWrapper: h-dvh on desktop (element scroll), min-h-dvh on mobile (document scroll) - DocumentBody: ScrollArea on desktop only, no wrapper on mobile - PageLayout: remove overflow-auto to prevent double scrollbars Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- PanelLayout: shared component for main+accessory panel layout - ResourcePage: integrates PanelLayout on desktop (mobile has no panels) - PanelContentRenderer: renders activity/discussions/directory/collaborators in panel - 480px minimum panel width enforcement - Filter support for activity panel Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Directory: headerRight prop - Collaborators: wrap in PageLayout with button - Activity: wrap in PageLayout with button - Discussions: fix to use docId prop instead of route Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- createDocumentNavRoute accepts panelParam to initialize route with panel - routeToHref extracts panel key and passes to idToUrl - idToUrl accepts panel param for ?panel= query string Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add onBlockSelect handler for copy block link - Add block citation/comment click handlers - Support ?panel=discussions:BLOCKID URL encoding - Pass CommentEditor to discussions panel and page - Works on both web and desktop platforms Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- MobileInteractionBar: bottom bar with avatar, feed, comments buttons - MobilePanelSheet: full-screen slide-up panel for discussions - useMobileConfig hooks for web and desktop account data - ResourcePage shows mobile UI on small screens (both platforms) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Support ?panel=comment/ID and ?panel=discussions/BLOCKID in omnibar - Fix search mode URL handling to preserve panel params - Clean up unused scrollRef/showOpenInPanel in page components Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…r URL display - Add OptionsDropdown to document page with Move, Copy Link (site+gateway), Export, Create Branch, Delete - Replace DiscardDraftButton with OptionsDropdown in draft page - Add breadcrumbs to document content area for non-home docs - Omnibar: show URL instead of breadcrumbs, action buttons, route labels, consistent height - Fix DocOptionsButton crash on non-document view routes - Fix DocumentTools left spacer shrink behavior - Remove duplicate OpenInPanelButton from content views - Fix pre-existing type errors (unused imports, missing exports) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix right panel content scrollability by adding h-full to flex container - Fix tab navigation closing right panel by preserving currentPanel across routes - Add panel & main view support for comment replies with proper thread navigation - Fix comments panel performance: add staleTime & remove console.logs - Fix CommentEditor hooks-after-return violation by moving useRef before early return Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show collapsible section at bottom of doc content listing child docs not referenced via Embed blocks, inline embeds, or inline links. Query blocks targeting same doc's children count as referenced. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit d23b1d8.
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.
Summary
Fixed four critical issues in resource page panel & comment system:
h-fullto panel flex container so content scrolls properly when longstaleTimeto comment queries and removed debug console.logs to prevent N+1 RPC callsuseRefbefore conditional return to satisfy React hooks rulesAll changes tested and type checking passes.
🤖 Generated with Claude Code