Repository navigation
fix(content-editor): honor contentCollection/contentItem deep-link params - #7151
Merged
Merged
Conversation
…rams The Blog Manager's "Editar no Studio" redirect (spire-agent PR #11, merged 2026-07-14) navigates to `?virtualmcpid=...&main=content&contentCollection=posts&contentItem=<blockKey>` expecting the content editor to land on that exact post. Studio's ContentBrowser never read those params — added in the still-open, now-stale PR #4302 (based on a pre-rename `apps/mesh` path that no longer exists) — so every "Editar no Studio" click just opened the generic Posts list instead of the post itself. Seed `activeCollection`/`selection` from `useSearch()` once via lazy useState initializers, mirroring the existing storefront "." deep-link pattern (`deepLinkPage`) already in this file. Older Studio builds without this simply ignore the extra params (unaffected). Co-Authored-By: Claude Sonnet 5 <[email protected]>
2 of 3 tasks
decocms Bot
pushed a commit
that referenced
this pull request
Sep 11, 2026
PR: #7151 fix(content-editor): honor contentCollection/contentItem deep-link params Bump type: patch - decocms (apps/api/package.json): 4.353.0 -> 4.353.1 - @decocms/native (apps/native/package.json): 4.353.0 -> 4.353.1 Deploy-Scope: web
yuriassuncx
added a commit
that referenced
this pull request
Sep 11, 2026
…earch schemas (#7154) #7151 added contentCollection/contentItem read + selection logic in ContentBrowser (Blog Manager's "Editar no Studio" deep-link), but neither the unified-chat route nor the agents route validateSearch schema declared them. TanStack Router strips any search param a route's validateSearch doesn't declare before the component ever sees it via useSearch — so the redirect landed on an empty content editor instead of the selected post, reproducing exactly what #7151 was meant to fix. Factor the content-editor search params (storefront "." deep-link + Blog Manager deep-link) into one `content-search-params.ts` module spread into both route schemas, so a future param ContentBrowser reads can't silently be dropped by one route and not the other again. The reported "Ver visualização" preview button issue was already fixed on main by #7150 (route derivation) + #7152 (stop gating on unrelated fields) earlier today — not reproducible against current main, just not yet deployed to studio.decocms.com. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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.
Problem
Clicking "Editar no Studio ↗" in the Blog Manager doesn't land on the
post being edited — it opens the generic Posts list instead.
Root cause
The Blog Manager's redirect (
decocms/spire-agentPR#11, merged
2026-07-14) navigates to:
ContentBrowsernever readcontentCollection/contentItem. Thissupport was written once, in #4302 — but that PR is stale (based on a
pre-rename
apps/mesh/...path that no longer exists after themesh→web rename) and bundles two unrelated features, so it never
merged.
Fix
Extracted just the deep-link piece and reapplied it to the current
apps/web/...layout: seedactiveCollection/selectionfromuseSearch({ strict: false })via lazyuseStateinitializers,mirroring the existing storefront "." deep-link pattern
(
deepLinkPage) already in this file. Read once — normal navigationtakes over from there. Older Studio builds without this change simply
ignore the extra params (unaffected — same graceful-degradation the
spire-agent side already relies on).
Test plan
tsc --noEmit(apps/web) cleanexact post in the content editor (needs a live deploy to verify)
Related
work is unrelated and still needs its own rebase/decision.
contract bug in spire-agent causing a
Minified React error #31crash when opening posts with a checklist section — fixed separately
in decocms/spire-agent.
Co-Authored-By: Claude Sonnet 5 [email protected]
Summary by cubic
Fixes the content editor so Blog Manager’s “Editar no Studio” link opens the exact post instead of landing on the generic Posts list.
ContentBrowsernow reads thecontentCollectionandcontentItemquery params once on mount and uses them to seed the active collection and selection. Normal navigation takes over afterward, and older Studio builds ignore the extra params without any change in behavior.Written for commit e661516. Summary will update on new commits.