Skip to content

Commit 417d962

Browse files
author
DavidQ
committed
Clarify Workspace V2 tool launcher to distinguish standalone vs session-based launches - PR_11_317
1 parent 985c6a9 commit 417d962

7 files changed

Lines changed: 87 additions & 3 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,10 @@ PR_11_316
159159
```bash
160160
npx @openai/codex run --model gpt-5.3-codex --reasoning medium "Implement PR_11_316: Harden Asset Manager V2 add/remove actions by rejecting duplicate ids, blank/whitespace fields, and missing remove ids with actionable status messages while preserving valid persistence behavior."
161161
```
162+
163+
---
164+
PR_11_317
165+
166+
```bash
167+
npx @openai/codex run --model gpt-5.3-codex --reasoning medium "Implement PR_11_317: Clarify Workspace V2 Asset Manager launcher with explicit no-session vs active-session state while preserving session-routed launch behavior."
168+
```

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Harden Asset Manager V2 add/remove rejection paths and preserve valid persistence behavior - PR 11.316
1+
Clarify Workspace V2 Asset Manager launcher session/no-session state and prevent no-session confusion - PR 11.317
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PR_11_317 Report
2+
3+
## Purpose
4+
Clarify Workspace V2 Asset Manager launcher behavior so standalone/no-session state is explicitly labeled and session-based launch is unambiguous.
5+
6+
## Files Changed
7+
- `tools/workspace-v2/index.html`
8+
- `tools/workspace-v2/index.js`
9+
- `docs/pr/PR_11_317_WORKSPACE_TOOL_LAUNCHER_SESSION_CLARITY/PLAN_PR.md`
10+
- `docs/pr/PR_11_317_WORKSPACE_TOOL_LAUNCHER_SESSION_CLARITY/BUILD_PR.md`
11+
- `docs/dev/reports/PR_11_317_report.md`
12+
- `docs/dev/codex_commands.md`
13+
- `docs/dev/commit_comment.txt`
14+
15+
## Implementation Summary
16+
- Set tools launcher button default to `Open Asset Manager V2 (no session)`.
17+
- Added computed launch readiness and label in Workspace V2 UI state model:
18+
- launch ready only when there is a valid active session payload with `payloadJson`.
19+
- Wired button state in renderer:
20+
- disabled + no-session label when active session is missing
21+
- enabled + active-session label when launch can route through active session.
22+
- Kept existing `openAssetManagerFromWorkspace()` launch flow unchanged for valid active session routing.
23+
24+
## Validation Commands
25+
- `node --check tools/workspace-v2/index.js` -> **PASS**
26+
- `node tests/runtime/V2WorkspaceAssetManagerLaunch.test.mjs` -> **PASS**
27+
28+
## Full Samples Smoke Decision
29+
- **Skipped** full samples smoke.
30+
- Reason: this PR is Workspace V2 UI-only and validated with targeted runtime test plus syntax check.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# BUILD_PR_11_317
2+
3+
## Implementation
4+
- Updated Workspace V2 tools launcher button text to start in explicit no-session mode:
5+
- `Open Asset Manager V2 (no session)`
6+
- Extended `computeWorkspaceSessionUiStateModel()` in `tools/workspace-v2/index.js` with:
7+
- `assetManagerLaunchReady`
8+
- `assetManagerLaunchLabel`
9+
- Updated `renderWorkspaceSessionUiStateModel(model)` to:
10+
- disable launch when no valid active session payload is available
11+
- relabel button dynamically:
12+
- `Open Asset Manager V2 (active session)` when launch is session-routed
13+
- `Open Asset Manager V2 (no session)` when launch is blocked
14+
- Preserved existing session-based launch path in `openAssetManagerFromWorkspace()` and did not alter producer/recent-session flows.
15+
16+
## Validation
17+
- `node --check tools/workspace-v2/index.js`
18+
- `node tests/runtime/V2WorkspaceAssetManagerLaunch.test.mjs`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# PLAN_PR_11_317
2+
3+
## Purpose
4+
Clarify Workspace V2 Asset Manager launch behavior so users can distinguish session-based launch from no-session state.
5+
6+
## Scope
7+
- `tools/workspace-v2/index.html`
8+
- `tools/workspace-v2/index.js`
9+
- `docs/dev/reports/PR_11_317_report.md`
10+
- `docs/dev/codex_commands.md`
11+
- `docs/dev/commit_comment.txt`
12+
13+
## Steps
14+
1. Update Asset Manager launcher button default text to indicate no-session state.
15+
2. Drive launcher button enable/disable + label from the existing Workspace V2 computed UI state model.
16+
3. Keep launch path routed through active session payload when present.
17+
4. Run targeted validation for changed JS and targeted Workspace Asset Manager launch runtime test.

tools/workspace-v2/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h2>Producer</h2>
3636
<section class="hub-panel">
3737
<h2>Tools</h2>
3838
<p>Open Workspace V2 tools from this explicit launcher menu.</p>
39-
<button id="workspaceV2OpenAssetManagerButton" type="button">Open Asset Manager V2</button>
39+
<button id="workspaceV2OpenAssetManagerButton" type="button">Open Asset Manager V2 (no session)</button>
4040
</section>
4141

4242
<section class="hub-panel">

tools/workspace-v2/index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,12 @@ class WorkspaceV2SessionProducer {
879879
: (diffCanCompute ? "Selections are valid." : "Select two different sessions to compute diff.")
880880
);
881881
const authoritativeLastMergedHostContextId = this.resolveAuthoritativeLastMergedHostContextId();
882+
const assetManagerLaunchReady = Boolean(
883+
this.isValidSessionPayload(this.currentSessionPayload) &&
884+
this.currentSessionPayload.payloadJson &&
885+
typeof this.currentSessionPayload.payloadJson === "object" &&
886+
!Array.isArray(this.currentSessionPayload.payloadJson)
887+
);
882888
const mergePreviewVisible = Boolean(
883889
this.pendingMergePreview ||
884890
this.mergeOutputSelectionKey ||
@@ -914,7 +920,11 @@ class WorkspaceV2SessionProducer {
914920
mergeSelectionText,
915921
mergePreviewStale: Boolean(this.pendingMergePreview && !mergePreviewFresh),
916922
mergePreviewVisible,
917-
undoEnabled: Boolean(authoritativeLastMergedHostContextId)
923+
undoEnabled: Boolean(authoritativeLastMergedHostContextId),
924+
assetManagerLaunchReady,
925+
assetManagerLaunchLabel: assetManagerLaunchReady
926+
? "Open Asset Manager V2 (active session)"
927+
: "Open Asset Manager V2 (no session)"
918928
};
919929
}
920930

@@ -946,6 +956,8 @@ class WorkspaceV2SessionProducer {
946956
this.undoLastMergeButton.disabled = !model.undoEnabled;
947957
this.mergeOutputNode.hidden = !model.mergePreviewVisible;
948958
this.renderMergeConflictSummary();
959+
this.openAssetManagerButton.disabled = !model.assetManagerLaunchReady;
960+
this.openAssetManagerButton.textContent = model.assetManagerLaunchLabel;
949961
}
950962

951963
refreshWorkspaceSessionUiStateModel(actionName = "refresh_load") {

0 commit comments

Comments
 (0)