feat: RW docs comments integration + dev Alice/Bob mock auth#69
Merged
Conversation
Adds inline commenting on RW documentation rendered in Backstage, plus a
dev-only multi-user auth harness to exercise it.
Backend (@rwdocs/backstage-plugin-rw-backend):
- SQLite/Postgres CommentStore (knex migration, uuid PK, soft-delete, atomic
resolve-stamp, transactional soft-delete/restore closing a TOCTOU).
- Entity-scoped /comments router: create/list/get/PATCH(resolve|edit|restore)/
delete with input validation (16 KiB body cap, parentId/siteRef checks),
Backstage permission dispatch + author floor, author profile resolution
(displayName/avatar), structured logging, 503 on catalog outage.
Common (@rwdocs/backstage-plugin-rw-common):
- rwComment.{read,create,edit,resolve,delete} permissions + isCommentAuthor rule.
Frontend (@rwdocs/backstage-plugin-rw):
- RwClient comment client + comments wiring through RwEntityDocsViewer /
RwDocsViewer; warn (not silently disable) when the comments-enabled probe fails.
Dev harness (packages/app, packages/backend, examples):
- Dev-only Alice/Bob proxy auth providers + a SignInPage picker (delegating to
ProxiedSignInPage, with localStorage resume); alice/bob User catalog entities.
Deps: @rwdocs/{viewer,core} ^0.1.27 (embedded comment deep-linking: copy-link
button + n/p URL-hash mirroring via replaceState).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
050fbef to
606d570
Compare
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.
Adds inline commenting on RW documentation rendered in Backstage, plus a dev-only multi-user auth harness to exercise it. Squashed from the full development branch.
Backend —
@rwdocs/backstage-plugin-rw-backendCommentStore(knex migration,uuidPK, soft-delete, atomic resolve-stamp, transactional soft-delete/restore closing a TOCTOU)./commentsrouter: create / list / get / PATCH (resolve · edit · restore) / delete, with input validation (16 KiB body cap,parentId/siteRefchecks), Backstage permission dispatch + author floor, author profile resolution (displayName/avatar), structured logging, and 503 on catalog outage.Common —
@rwdocs/backstage-plugin-rw-commonrwComment.{read,create,edit,resolve,delete}permissions +isCommentAuthorrule.Frontend —
@rwdocs/backstage-plugin-rwRwClientcomment client + comments wiring throughRwEntityDocsViewer/RwDocsViewer; warns (instead of silently disabling) when the comments-enabled probe fails.Dev harness —
packages/app,packages/backend,examples/SignInPagepicker (delegating toProxiedSignInPage, withlocalStorageresume);alice/bobUsercatalog entities.Dependencies
@rwdocs/{viewer,core}→^0.1.27(embedded comment deep-linking: copy-link button +n/pURL-hash mirroring viareplaceState).Verification
make allgreen (typecheck / lint / build); comments test suites pass.n/phash, no Back/Forward history growth).🤖 Generated with Claude Code