Skip to content

Studio Code: Revert active site facts and saved Site Editor copy notes - #5361

Merged
youknowriad merged 1 commit into
trunkfrom
revert-site-facts-and-saved-copies
Oct 24, 2026
Merged

youknowriad merged 1 commit into
trunkfrom
revert-site-facts-and-saved-copies

Conversation

@youknowriad

@youknowriad youknowriad commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude Code reverted both PRs, resolved the one conflict with #5333 (keeping its shared result notes), and ran lint, typecheck and the apps/cli/ai tests. I reviewed the diff.

Proposed Changes

#5092 handled templates and parts saved in the Site Editor with one sentence in edit-manage-site. #5301 replaced that sentence with Active site facts in the system prompt, and #5343 moved the saved copies into tool-result notes, backed by a SQLite reader and theme-path matching.

#5343's own evals show this machinery does no better than the sentence. Both pass the saved-copy cases (template part 6/6, Global Styles 6/6), and the sentence's cost on unrelated edits was not measurable: 14.3 vs 14.1 tool calls before the first write, with tokens and wall time at parity. Meanwhile the notes only fire when a call names the exact theme file a copy replaces. They duplicate WordPress's template resolution in SQL, and they widen result notes into a hook on every call's arguments, which makes it easy to keep adding special cases that never show in tool descriptions.

This brings back the one-line guidance in edit-manage-site, which reaches both Studio Code and studio mcp. It also removes the Active site facts. The WordPress version was their only remaining line, and site_info already reports it. #5333's block settings notes stay as they are.

Testing Instructions

  • npx vitest run apps/cli/ai passes.

  • npm run eval -- --filter-pattern "in the Site Editor" runs Studio Code: Apply theme template edits to Site Editor customizations instead of silently missing them #5092's two cases, template-part-db-override and global-styles-db-override. On this branch, one run each with Studio's default model (fast):

    Case Result Tool calls Tokens Turn time
    Template part saved in the Site Editor Pass 10 117k 28s
    Global Styles saved in the Site Editor Pass 10 94k 18s

    In both runs the agent loaded edit-manage-site, listed the saved copies with post list, and edited the saved post: header post 5 with submenuVisibility: "click" and the tagline kept, and Global Styles post 5 with the new background and the saved line height kept. It didn't touch the theme files. This is one run per case, so it confirms the sentence still works; it doesn't measure a rate.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

🤖 Generated with Claude Code

#5301, #5343)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@youknowriad
youknowriad marked this pull request as ready for review October 24, 2026 13:12
@youknowriad

Copy link
Copy Markdown
Contributor Author

Let's do this temporary revert while our friend @chubes4 explore an alternative architecture.

@youknowriad
youknowriad merged commit a00f9e4 into trunk Oct 24, 2026
14 checks passed
@youknowriad
youknowriad deleted the revert-site-facts-and-saved-copies branch October 24, 2026 19:34
chubes4 added a commit that referenced this pull request Oct 25, 2026
Conflicts came from #5361 (the revert of active site facts and saved Site
Editor copy notes) and #5372 (the apps/ui reorganization). The spike keeps
its side of #5361: site-facts.ts, saved-copies.ts and their tests stay;
result-notes.ts and the edit-manage-site skill stay deleted; served-tool.ts,
runtimes/pi/index.ts, system-prompt.ts and tests/system-prompt.test.ts keep
the spike's version, #5361 being trunk's only change to them since the merge
base. The spike's one change to the old session-view conversation, dropping
the inspect_design display case, is applied where #5372 moved it
(features/chats/session-view/conversation/trace/tool-display.ts).
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