Skip to content

feat(work-panel): land PR #621 plan artifacts in the file view - #647

Merged
vastsa merged 7 commits into
mainfrom
merge/pr-621
Sep 19, 2026
Merged

vastsa merged 7 commits into
mainfrom
merge/pr-621

Conversation

@vastsa

@vastsa vastsa commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Lands #621 onto current main.

Plan and goal approval artifacts open in the bundled pi.file-manager view when it is launchable (D452), same as other project files. Startup now resolves launchable views before restoring pending-plan artifacts.

Conflict with main was only docs/spec/08-meta/decisions-log.md: kept both D452 and D457, with matching EN/zh-CN table order.

Closes #618
Closes #619

Tioit-Wang and others added 7 commits September 19, 2026 03:24
The contract approval card's opener handed the immutable .pi/plan or
.pi/goal markdown to the host file tab, while every other project file
the conversation names already opens in the bundled pi.file-manager
view, so a plan or goal landed in the one surface the user does not
browse project files in.

Both callers now pick their tab through one preference helper: the file
view when it is launchable, the host file tab otherwise. The chat
file-reference hook shares the same launcher check instead of repeating
it, and the decision log records the amendment as D452.

Renderer only; the approval reveal keeps creating or activating a tab in
its originating session.
The English decision log gained the D452 row and two specs gained a clause about which surface opens a plan or goal artifact, but the Chinese mirrors kept their old shape. The docs test compares table shape between every English page and its zh-CN mirror, so the missing row failed 'every English specification has a valid Chinese mirror'.

Mirror the row and both clauses so the pair stays structurally and semantically in sync.
…tore

bootstrap opened each pending plan's artifact before the renderer had read the launchable plugin views, so a restart or reload with a live approval fell back to the host file tab and then took a second tab when selectSession restored the same proposal. Refresh the view list before that loop, which is what the surface choice needs.

Also record the surface's consequence: the bundled file view can edit and save the artifact, so a plan changed before Approve fails the host's recorded-hash check (PLAN_ARTIFACT_HASH_MISMATCH) until the proposal is resubmitted, and align the E2E wording with 'not launchable'.
…tore

The previous assertion only required the view refresh to appear within 400 characters before some openPlanArtifact call, which a move into the restore loop itself would still satisfy, and nothing covered the slice call sites that forward the live list.

Pin the bootstrap order instead - the refresh, then the pending-plan loop, then the first artifact open - and require both slices to pass get().pluginViews.
The same 'for (const proposal of activePendingPlans)' shape also runs once before the set({ ready }) that precedes the restore, so a plain indexOf matched the planning-state loop and the new assertion failed for the wrong reason.

Search from the refresh index instead, which finds the restore loop and the artifact open it guards.
PR #609 removed the tool-result Review gate but left present-tense claims that a tool result or a conversation artifact still opens, creates, or activates Review: two ADRs, the ADR 0019/0042 work-panel notes, the E2E-058 expectation, the screenshots guide, and stale zh-CN mirrors of two UX pages.

Rewrite them to the shipped rule - Review opens only on explicit user action - and name the plan/goal artifact's host-chosen view (D452) in the one source comment that described who opens a work-panel view. No behavior, protocol, or decision-ID change.
Keep both D452 (plan artifacts in the bundled file view) and D457
(two-icon signed DMG) in the decisions log, with matching EN/zh-CN
table order.
Copilot AI lite review requested due to automatic review settings September 19, 2026 12:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 7c0710f into main Sep 19, 2026
3 of 4 checks passed
@vastsa
vastsa deleted the merge/pr-621 branch September 19, 2026 12:17

This branch was successfully deployed

1 active deployment
Preview — 741c1cde Deployed Sep 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] D451 之后多处文档仍声明审阅由编辑产物自动打开 [Feature] 计划/目标审批工件改用内置文件视图打开

3 participants