feat(wedge): PR-WV1-7 — Sponsor ACL wiring + ADR-059 dead-code cleanup#190
Merged
Conversation
usePublishReport was a stub that immediately errored ("SharePoint upload
removed — use local export"). Delete the hook file, drop the 7 publish
props from ReportViewBase, and remove all publish-status JSX branches
(sidebar footer + mobile action bar). Remove the hook usage from
apps/azure ReportView.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
useShareReport wrapped useTeamsShare.isTeams which is always false (Teams SDK removed per ADR-059), making canShare always false. The "Share link" button + canShareViaTeams gated Share Report button were both unreachable UI. Delete useShareReport.ts; drop onShareReport, shareLinkGate, and canShareViaTeams from ReportViewBase props and all three callers (azure ReportView, pwa ReportView, ReportViewBase JSX). Drop the ShareLinkGate export type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… userId/members Sponsor is read-only (wedge spec §3.1). Photo attach was always-on after the tier-gate deletion in WV1-5. Close the B-class deferral from investigations.md. - Add userId + members props to InvestigationWorkspace (from canAccess) - Gate onAddPhoto on canAccess(userId, members, 'edit-improve') - Delete isTeamsCamera + handleCaptureFromTeams props (isTeamsCamera is always false per ADR-059 + usePhotoComments.ts:115 + existing test) - Plumb userId (currentUser?.email) + members (wallActiveIPMembers) from Editor.tsx mount; remove unused handleCaptureFromTeams destructure - Update InvestigationWorkspace.mapwall.test.tsx fixture props Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ests
Remove 9 i18n keys from types.ts + all 32 locale files:
report.action.shareReport
report.action.publishToSharePoint
report.action.publishedToSharePoint
report.publish.{rendering,uploading,exists,replace,failed,tryAgain}
Delete share/canShareViaTeams describe blocks from ReportViewBase.test.tsx
(those props are gone).
Add 3 canAccess photo-gate tests to InvestigationWorkspace.mapwall.test.tsx
asserting: Lead gets onAddPhoto, Sponsor gets undefined, null userId gets
undefined. FindingsLog mock now captures props; usePanelsStore imported for
investigationViewMode toggle.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The PR-WV1-5 Task 3 deferral ("canAccess() rewires deferred") is closed
by this PR. Delete the entry — the diff is the durable record.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… fallback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Close the wedge V1 conformance gap. Wire
canAccess('edit-improve')at InvestigationWorkspace photo handlers (the B-class deferral from PR-WV1-5 Task 3) AND delete two zombie features uncovered during the audit: SharePoint publish (already a stub per ADR-059) and the orphaned share-link UI. 43 files, +88/-711 lines, 5 categorized commits.What changed
Concern A — SharePoint publish deletion (ADR-059 alignment)
usePublishReport.publish()was already a stub that errored with "SharePoint upload removed — use local export". ADR-059 (Web-First Deployment) retired SharePoint. UI dead code remained.apps/azure/src/hooks/usePublishReport.ts(entire hook)ReportViewBase(onPublishToSharePoint,onPublishReplace,publishStatus,publishError,onPublishReset,publishedUrl, plus state-render branches)ReportView.tsximport + ~20-line ADR-026 comment block + prop passesConcern B — share-link dead UI deletion
useShareReportwas a wrapper that always returnedcanShare=false. Azure passed a stub callback; PWA passedshareLinkGate="locked". Orphaned.apps/azure/src/hooks/useShareReport.tsshareLinkGate,onShareReport,canShareViaTeamsprops fromReportViewBase+ Azure + PWA wrappersShareLinkGateexport type retiredScope correction:
useTeamsShare.tsKEPT — actively used for clipboard-share inEditor.tsx+useShareFinding. Only the dead wrapper goes.Concern C — canAccess('edit-improve') wiring (the B-class fix)
InvestigationWorkspace photo handlers were tier-gated in WV1-5; the gate dropped, leaving them always-on. Wedge spec §4.1: Sponsor read-only. This wires the proper role check.
canAccessimport +userId: string | null+members: ProjectMember[]props toInvestigationWorkspace.tsxonAddPhotoat line 976:userId && canAccess(userId, members, 'edit-improve') && handleAddPhotoEditor.tsx: plumbeduserId={currentUser?.email ?? null}+members={wallActiveIPMembers}(both already in scope)onCaptureFromTeams+isTeamsCameraentirely instead of gating —usePhotoComments.ts:115hardcodesisTeamsCamera: falseper ADR-059 Teams SDK removal, so the branch is structurally deadi18n + tests
types.ts+ 32 locale files (report.action.publishToSharePoint,report.action.shareLink,report.publish.*, etc.)describeblocks dropped fromReportViewBase.test.tsxInvestigationWorkspace.mapwall.test.tsx(Lead wired, Sponsor undefined, null userId undefined)investigations.md resolution
Plan + reviews
Sub-plan:
~/.claude/plans/execute-the-wv1-5-elegant-whale.mdSpec + quality reviewer (Sonnet): APPROVE. No blocking or important issues. Both scope corrections defensible and documented.
Test plan
@variscout/uiReportView: 146/146 pass@variscout/azure-appInvestigationWorkspace: 11/11 pass (with 3 new Sponsor-gate tests)@variscout/azure-appReportView: 18/18 pass@variscout/corei18n: 70/70 passpnpm lint— 0 errorspnpm docs:check— 529 docs validated, frontmatter cleanpublishToSharePoint,usePublishReport,useShareReport,shareLinkGate,onShareReport,canShareViaTeamsreferencesWedge V1 progress
'handoff'alias cleanup — post-V1 housekeepingWedge V1 architecture scope: 100% shipped. Remaining items are operational, not architectural.
🤖 Generated with Claude Code