Blog: after publishing a post to "My blog", the redirect uses category "blog" instead of the post's first tag (/blog/blog/@user/… on peerverity)

Follow-up to #1194 (closed) (closed; it fixed the community dropdown and the editor's community switch). Reported by @akociubinski in a #1194 (closed) comment on 2026-10-15.

Problem and intended result

Adam published test-ako-peerverity-post-001 as guest4test on https://denser.discuss.peerverity.info (develop f3f40a776d, category tag test, community "My blog"). After "Post submitted successfully" the app navigated to /blog/blog/@guest4test/test-ako-peerverity-post-001. The page renders only because blog is read as the category segment of /[category]/@author/permlink, so the URL names the wrong category and a shared link is wrong.

Likely cause (from reading the code, not reproduced): apps/blog/features/post-editor/hooks/use-post-form-actions.ts l.171 builds /${postParams.category}/@${username}/${postParams.permlink}?pending=1, and with "My blog" selected the form's category is the literal blog, not the post's real category (its first tag, which becomes parent_permlink). With basePath /blog this gives /blog/blog/@…; with no basePath (blog.dev) it gives /blog/@…, wrong category there too. It is not a withBasePath double prefix; that was removed in #1194 (closed).

Intended: after publishing, the app navigates to the post's canonical URL, /<parent_permlink>/@<author>/<permlink>, under the app's basePath exactly once, for both "My blog" and community posts.

Required behavior

  • The post-publish redirect uses the category the post is actually broadcast with (the comment operation's parent_permlink: the first tag for "My blog", the community name for a community post).
  • The base path appears once on peerverity (/blog/...) and not at all where there is no base path.
  • Editing an existing post is unchanged.

Acceptance criteria

  • Publishing to "My blog" with first tag test navigates to /test/@<user>/<permlink>?pending=1 (under basePath: /blog/test/@…).
  • Publishing to a community hive-123456 navigates to /hive-123456/@<user>/<permlink>?pending=1.
  • No navigation after publishing contains /blog/blog/, and no post URL has blog as its category unless blog is really the first tag.
  • A fixture/unit test covers the redirect URL for both the "My blog" and community cases, and fails on today's code.

Verification

Unit test on the URL construction, plus a fixture spec if the editor submit path is testable with recorded data. Dan will check the live redirect on peerverity after promote (it needs a real broadcast).

Integration points

  • apps/blog/features/post-editor/hooks/use-post-form-actions.ts — redirect URL after a successful publish uses the broadcast category

Scope boundary

Only the post-publish redirect. The community dropdown and editor community switch were fixed in #1194 (closed).