fix(desktop): offer to restore an archived project when re-adding its directory - #4936
Open
faga295 wants to merge 1 commit into
Open
fix(desktop): offer to restore an archived project when re-adding its directory#4936faga295 wants to merge 1 commit into
faga295 wants to merge 1 commit into
Conversation
Astro-Han
reviewed
Sep 6, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
I reviewed this PR at head 9a27002c (17 files, +262/−21) against base 2310035a.
Gate is not ready — two blockers:
- Protocol epoch regression on merge. The head's
packages/runtime-host/src/protocol/index.tsdeclaresRUNTIME_HOST_COMPATIBILITY_EPOCH = 112, while the live base and currentmainare at 121 (nine versions newer). The branch forked from epoch-112-eramainand has never been rebased: the merge-base (cbeb1a93c) is at 112, the head's first parent is that same old commit, and the branch is 62 commits behindmain. The PR makes no protocol change, so there is no epoch bump in the diff — but merging this head would regress the protocol epoch from 121 to 112. Please rebase onto the currentmain(no epoch bump is needed afterwards, since the protocol is untouched) and push the new head for re-review. - CI has not run on this head. Only the
labelcheck exists; thetestworkflow was never scheduled (first-contributor approval gate). The merge gate cannot close untiltestruns green on the exact head.
Code review (the feature itself):
- The Add-project flow now detects an archived project after catalog registration and returns
{ ok: false, reason: 'archived', projectId }instead of failing opaquely; all three entry points (app-shell project actions, task-entry workspace picker, projects settings page) present a confirm dialog and restore through the existingprojects:restorebridge andprojectManagement.restorepath. toast.confirmis a pre-existing@maka/uiAPI, and the type wiring is sound; copy covers en/zh-CN/zh-TW for the dialog keys.- Tests cover the archived detection, the confirm → restore → select flow, and restore-failure retry (pending state released).
- The added runtime-host error logging uses
generalizedErrorMessagefor the summary; one recorded P3: the rawerrorobject is also passed as the secondconsole.errorargument, which may still carry paths in the main-process log (not a user-facing surface, acceptable).
No P0–P2 code findings. This is a bugfix for #4935 and the direction is right, but the current head must not be merged: rebase onto current main and get CI approved/run first.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
… directory Adding a directory that belongs to an archived project previously just failed with no way forward. The add flow now returns an `archived` reason with the project id, and the app shell, task-entry workspace picker, and projects settings page offer a confirm dialog to restore the archived project in place. Also adds a `restoreProject` bridge method and error logging to the runtime-host project/skill catalog coordinators so commit_outcome_unknown failures are visible in logs.
faga295
force-pushed
the
fix/create_archived_project
branch
from
September 7, 2026 02:50
9a27002 to
9669fcc
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.
Summary
Fixes #4935
When the Add project flow picks a directory that belongs to an archived project, it now returns an
{ ok: false, reason: 'archived', projectId }result instead of failing opaquely. All three entry points then show a confirm dialog offering to restore the archived project in place, after which the add/selection succeeds:app-shell-project-actions.ts)use-task-entry-controller.ts, newconfirmport with toast-confirm default)Also included:
projects.restoreProjectpreload bridge methodcommit_outcome_unknownmutation failures are visible in logs (usesgeneralizedErrorMessageto avoid leaking paths)Test plan
npm run build:testpassesnode --teston the touched suites (app-shell-project-actions,project-management-service,task-entry-controller,use-project-context): 28/28 pass, including new cases covering the archived → restore → select flow