feat(batch17): add visibility-tiered snapshots across audit, usage, ops, and snapshot UI#2
Open
yangshu2087 wants to merge 4 commits intomainfrom
Open
Conversation
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.
Batch-17 scope
This PR implements 快照权限分级 + 审计可见域控制 in three layers and keeps the rollout aligned with workspace roles.
Layer 1 — Audit + Usage visibility hardening
/auditand/usagepagesLayer 2 — Ops visibility hardening
/ops/queuesvisibility rules/opspage to explain what is hidden for the current roleLayer 3 — Unified future snapshot page
/snapshotas a single read-only Batch-17 landing pageusage,audit, andopsresponses instead of adding a new backend snapshot contract/usage,/audit,/ops)Role behavior summary
Audit
Usage / billing snapshot
Ops / queue health
Main files changed
apps/api/src/common/workspace-context.service.tsapps/api/src/modules/audit/*apps/api/src/modules/usage/*apps/api/src/modules/ops/*apps/api/test/audit-visibility.test.tsapps/api/test/usage-visibility.test.tsapps/api/test/ops-visibility.test.tspackages/shared/src/types.tsapps/web/app/audit/page.tsxapps/web/app/usage/page.tsxapps/web/app/ops/page.tsxapps/web/app/snapshot/page.tsxapps/web/app/dashboard/page.tsxapps/web/components/shell/workbench-shell.tsxapps/web/lib/queries.tsVerification
npx pnpm --filter @draftorbit/db prisma:generatenpx pnpm --filter @draftorbit/api testnpx pnpm --filter @draftorbit/api typechecknpx pnpm --filter @draftorbit/web typecheckNotes
/snapshotpage is intentionally a read-only aggregator over existing visibility-aware endpoints