Skip to content

Improve onboarding with automatic detection and suggestions#26

Merged
bnz183 merged 3 commits into
mainfrom
feature/public-ready-onboarding-polish-v2
Jun 12, 2026
Merged

Improve onboarding with automatic detection and suggestions#26
bnz183 merged 3 commits into
mainfrom
feature/public-ready-onboarding-polish-v2

Conversation

@bnz183

@bnz183 bnz183 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Adds setup detection improvements (content-root detection, frontmatter schema inference, config suggestions from detection), onboarding copy aligned with AI-assisted publishing workflows, and editor/onboarding docs (including docs/editor-parity.md).

Also keeps the Studio browser bundle free of node:fs config imports.

Note: this branch overlaps with PR #25 on onboarding docs (roadmap/non-technical-overview/getting-started); whichever merges second may need a trivial docs conflict resolution.

🤖 Generated with Claude Code

bnz183 added 3 commits June 12, 2026 07:07
Use browser-safe default categories in the client, align e2e with demo
fixtures and toolbar labels, and lock the underline extension dependency.
@bnz183 bnz183 merged commit 91b846f into main Jun 12, 2026
9 checks passed
@bnz183 bnz183 deleted the feature/public-ready-onboarding-polish-v2 branch June 12, 2026 16:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dbedfeba63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +64 to +69
const scanned = findMarkdownContentDirs(root, 5)
.filter((entry) => entry.postCount > 0)
.map((entry) => ({
contentDir: entry.relativePath,
postCount: entry.postCount,
}));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude non-content roots from detected content dirs

When a site repository has Markdown files at the repository root or shallow docs (for example README.md plus CHANGELOG.md), this unweighted scan is merged with the adapter-specific candidates and can rank "" or a docs folder above the real src/content/blog/content/posts folder. The generated config then writes that wrong contentDir, causing new posts to be published outside the actual content collection; prefer filtering the repo root/non-content docs or weighting known adapter candidates ahead of generic scan results.

Useful? React with 👍 / 👎.

Comment on lines +59 to +60
if (typeof value === "string" && value.trim().length > 0) {
return [value.trim()];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Split YAML category arrays before suggesting categories

When existing posts use common YAML array syntax such as categories: [Tech, Life], the lightweight frontmatter parser returns the whole bracket expression as a string, and this branch records it as one suggested category. That suggestion flows into generateConfigFromDetection, so the generated config can contain "[Tech, Life]" instead of separate categories, making the onboarding-generated category list immediately wrong for those sites.

Useful? React with 👍 / 👎.

Comment on lines +318 to +319
if (marks.some((mark) => mark.type === "underline")) {
value = `<u>${value}</u>`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid serializing leading underline as an MDX block

When a user underlines text at the start of a paragraph, this emits a line like <u>Intro</u>. On the next load, splitMdxBlocks treats any line starting with an HTML tag as a raw MDX block, and because its collector does not notice the closing tag on the same first line, it can turn the underlined paragraph (and following lines) into an uneditable raw block instead of normal rich text.

Useful? React with 👍 / 👎.

Comment on lines +19 to +20
const root = resolveSetupDetectionRoot();
const result = generateConfigFromDetection(root, detection.primary);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid writing generated config under the Studio package

When the API is started from apps/studio (the normal package script cwd), resolveSetupDetectionRoot() stops at that package's package.json, so this writes apps/studio/sourcedraft.config.json rather than the project/root config that loadSourceDraftConfig() would otherwise find in a parent directory. Because app-local config is loaded first, clicking Generate config can silently shadow an existing root config and make Studio switch to the newly detected/wrong paths.

Useful? React with 👍 / 👎.

Comment on lines +55 to +56
const strikeMatch = text.slice(index).match(/^~~([^~]+)~~/u);
if (strikeMatch) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop text scanning before strike and underline markers

When toolbar formatting is applied to a word after other text, the serializer writes Markdown like Hello ~~word~~ or Hello <u>word</u>, but on reload these new token branches are never reached because the fallback text scan below does not stop on ~ or <. The rich editor then shows the literal delimiters and loses the mark for common inline strike/underline usage unless the marker starts the paragraph.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant