feat: unified docs space, wizard with remote repo form, image fixes#23
Draft
feat: unified docs space, wizard with remote repo form, image fixes#23
Conversation
Contributor
Release Version Check
This version will be released automatically when this PR is merged to Changelog preview0.4.0 (2026-03-15)Features
Bug Fixes
Refactoring
Documentation
Chores |
Contributor
Preview DeploymentThe web app for this PR has been deployed: Use this to verify the app works correctly, especially for dependency updates. |
c85919a to
cceb29d
Compare
cceb29d to
a566eff
Compare
7d6fa34 to
eb5a3c1
Compare
On preview deploys, the app now shows two documentation spaces in the space switcher: "Docs (This PR)" with docs from the PR branch, and "Docs (Live)" with docs fetched from the main branch at build time. This lets reviewers compare documentation changes side by side. - Add live-docs-content.ts stub (replaced at build time by generate-live-docs.sh) - Extend router to support /live-docs routes - Update App.tsx to conditionally show both docs spaces when __IS_PREVIEW__ - Update preview-deploy workflow to run the live docs generator and set VITE_IS_PREVIEW https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
- Unit tests failed because __IS_PREVIEW__ global was not defined in vitest.config.ts define block (added as false for test env) - Preview deploy failed with non-fast-forward because git checkout gh-pages didn't reset to origin/gh-pages; use -B flag to force-reset https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…ew deploy The generate-live-docs.sh script modifies live-docs-content.ts during build. This uncommitted change blocks the checkout to gh-pages branch. Add git checkout -- . to discard working tree changes after the build is complete. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…HTML rule ImageBlock only matched <figure data-type="image"> tags, but tiptap-markdown renders  as bare <img> elements via markdown-it. Added img[src] as a second parseHTML rule so markdown images are properly parsed into imageBlock nodes. Also added markdown serialization support. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
Adds a callout banner and a test image to the docs index page so the PR preview docs can be visually distinguished from the main branch docs. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…images The previous img[src] parseHTML approach didn't work because tiptap-markdown registers its own built-in 'image' node with the same img[src] selector, which wins the match. Instead, use the markdown parse.updateDOM hook to transform bare <img> elements into <figure data-type="image"> elements before ProseMirror parsing, so they match imageBlock's parseHTML rule. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…ge paths document.baseURI changes with pushState navigation, so when the user navigates to /cept/pr-23/docs/docs-index the image URLs resolve to the wrong path. Using Vite's build-time BASE_URL gives a stable base path regardless of client-side routing. Also updated the live-docs wrapper generator to use its own resolver instead of re-exporting main's (which has the old baseURI approach). https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…d time The previous approach cast import.meta to unknown, which defeated Vite's build-time replacement of import.meta.env.BASE_URL — leaving it undefined at runtime and falling back to '/'. Now uses the literal expression directly. Added ImportMeta/ImportMetaEnv type declarations to @cept/ui globals. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…shots - Change ImageBlock width default from 100% to null so images render at their natural size, centered, capped at max-width: 100% - Update CSS to use flexbox centering, rounded corners (6px), and subtle hover shadow matching Notion's image presentation - Remove 4 unused/duplicate screenshots (features-page, text-formatting, getting-started, sidebar) - Add .claude/rules/images-and-screenshots.md with conventions for image syntax (prefer standard markdown), styling (natural size by default), and screenshot management https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
Renamed .claude/rules/images-and-screenshots.md to content-formatting.md and expanded to cover all content formatting conventions: markdown syntax preferences (standard MD, fallback to GFM, avoid raw HTML), images, screenshots, asset references, links, and code blocks. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…ions Added an Images section documenting standard markdown image syntax, natural-size rendering, and alt text requirements. Updated Design Principles to clarify the preference hierarchy: standard Markdown first, GFM fallback, HTML as last resort. Updated both docs/content/ source and bundled docs-content.ts. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
Four related bugs caused the app to get permanently stuck on "Loading...": 1. Race condition in ensureDir/ensureParentDir: concurrent mkdir calls (from backend.initialize() and loadPersistedState) could throw EEXIST, propagating up and preventing ready state. Fixed by catching mkdir errors. 2. No error handling in useWorkspacePersistence: if loadPersistedState threw, ready never became true. Added try/catch to fall back to defaults. 3. Missing page content = infinite loading: when readPageContent returned null (file missing), contentLoaded stayed false forever. Now sets empty string so the page renders instead of showing "Loading..." permanently. 4. Race condition in clearAllData: deletes and writes ran concurrently, so freshly-written page files could be deleted by the still-running clear. Fixed by awaiting clearAllData before writing new content. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
Image blocks with unloaded/broken images had 0 dimensions, causing them to be hidden. Adding min-height: 2rem ensures the block is visible even when the image hasn't loaded yet (e.g., in CI or with broken URLs). https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
- Remove live-docs space entirely (no more dual docs spaces) - Remove __IS_PREVIEW__ flag and live-docs content generation - Docs space is now a regular space in the dropdown switcher (no back arrow, same UX as switching between user spaces) - Remove "Back to my space" button from docs banner - Add "Add Cept Docs (from main)" option in Settings > Spaces for future remote docs space support - Clean up preview-deploy workflow (no more generate-live-docs.sh step) - Simplify router to remove live-docs route type https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…flow "Create new space" now opens a type chooser (empty local vs. add from remote) instead of immediately showing a name input. The separate "Remote Spaces" section is removed — remote sources are accessed through the same wizard. Back navigation lets users step through the flow. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
Move the space creation wizard flow out of SettingsModal into a new AddSpaceWizardModal component that opens as a separate overlay (z-index 300) on top of the settings dialog. The "Create new space" button in Settings > Spaces now triggers the external wizard modal instead of modifying content inline. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
…zard - SpaceInfo now includes remoteUrl, branch, and subPath fields - Space listing in Settings shows branch badge when available - SpaceDetails view shows remote URL, branch, and path in detail grid - Docs space source split into structured fields instead of one string - Add-from-remote wizard step now shows a form with URL, branch, and sub-path inputs pre-populated with the Cept Docs repo defaults - Quick-add button for Cept Docs preserved below the form - Tests updated for new wizard form behavior and branch display https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
46c1cc4 to
f007288
Compare
The docs space metadata (GitHub source URLs and branch label) was hardcoded to 'main', so preview deploys showed docs sourced from main even though the content was built from the PR branch. Now the branch is injected at build time via HEAD_BRANCH env var. https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW
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.
Summary
SpaceInfonow carriesremoteUrl,branch, andsubPathfields. The Spaces tab shows a branch badge on each space listing, and the detail view displays remote URL, branch, and path<figure>wrapping via TipTap parseHTML rules. Fixedimport.meta.env.BASE_URLusage for asset paths in docs__IS_PREVIEW__build flagmain, so preview deploys correctly link to the PR branchTest plan
bun run test)bun run typecheck)https://claude.ai/code/session_01CTseT41ruGN2oiFgwW53gW