Skip to content

fix(product-api): surface pending-review worktree artifacts on Products page - #534

Merged
carlospedreira merged 4 commits into
andresharpe:mainfrom
IBondarenko-iwg:fix/519-pending-review-products
Jun 26, 2026
Merged

fix(product-api): surface pending-review worktree artifacts on Products page#534
carlospedreira merged 4 commits into
andresharpe:mainfrom
IBondarenko-iwg:fix/519-pending-review-products

Conversation

@IBondarenko-iwg

@IBondarenko-iwg IBondarenko-iwg commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Linked issue

Closes #519

Summary of changes

Get-ProductList, Get-ProductDocument, and Get-ProductDocumentRaw only read from the main workspace/product/. When a task parks at needs-review, its artifacts live in the task's git worktree — invisible to the reviewer.

Added Get-PendingReviewProductRoot helper that scans task files for needs-review status (both schema-v2 workflow-runs/ layout and legacy flat layout), cross-references worktree-map.json, and returns the product dirs of matching worktrees. All three API functions now fall back to these pending roots. Main location takes precedence — no duplicates. In-progress task artifacts are excluded.

Screenshots / recordings

Before (main) After (fix branch)
image image
image

Testing notes

  1. Have a project with commits and an active task worktree containing product files
  2. Set the task status to needs-review in its task JSON
  3. Open the Products page — worktree artifacts appear alongside merged docs
  4. Approve/merge the task — artifacts appear via the normal path, no pending_review flag

Automated: new test cases added to tests/Test-Components.ps1 covering pending artifact listing, dedup (main wins), Get-ProductDocument fallback, in-progress exclusion, and missing worktree-map graceful handling.

Checklist

@IBondarenko-iwg
IBondarenko-iwg marked this pull request as ready for review June 23, 2026 17:08
@carlospedreira carlospedreira added type:bug Something is broken bug Something isn't working labels Jun 25, 2026 — with ChatGPT Codex Connector
@carlospedreira carlospedreira removed the type:bug Something is broken label Jun 25, 2026
Comment thread tests/Test-Components.ps1 Outdated

@carlospedreira carlospedreira left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after the pending-worktree raw fallback test update.

@carlospedreira
carlospedreira merged commit 484c818 into andresharpe:main Jun 26, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Dotbot Product Backlog Jun 26, 2026
mirzazekicapi pushed a commit to mirzazekicapi/dotbot that referenced this pull request Jun 26, 2026
PR andresharpe#534 (fix andresharpe#519) landed Issue E upstream. Their Get-PendingReviewProductRoot
filters to needs-review status only (vs our all-active-worktrees approach),
uses HashSet dedup, and extracts New-RawProductResponse helper. Took upstream
version entirely. Issue E now fully covered by upstream.
Remaining unique changes: B (interview-answers.json), D (output delta).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Products page does not show task artifacts before approval — reviewers see empty page

2 participants