Skip to content

Commit 1ba386c

Browse files
author
DavidQ
committed
Restore Session Inspector as a first-class tool without reintroducing tool communication coupling - PR_26128_002-restore-session-inspector
1 parent 16b0b64 commit 1ba386c

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

docs/dev/reports/session_inspector_restore.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Added first-class registry wiring in `tools/toolRegistry.js`.
77
- Added tools index grouping for `session-inspector` as a Viewer in `tools/renderToolsIndex.js`.
88
- Added shared navigation grouping for `session-inspector` as a Viewer in `tools/shared/platformShell.js`.
9+
- Rerun delta adds an explicit Session Inspector runtime contract in `tools/session-inspector/js/services/SessionInspectorRuntimeContract.js` and wires it through tool boot status.
910

1011
## Boundaries
1112
- No cross-tool communication was added.
@@ -17,9 +18,12 @@
1718
## Validation
1819
- `npm run test:workspace-v2`: Pass, 10 passed.
1920
- Targeted Session Inspector launch test: Pass.
21+
- Targeted Session Inspector runtime contract validation: Pass.
2022
- Targeted tools index Session Inspector card/link validation: Pass.
2123
- Targeted Workspace Manager V2 launch validation: Pass.
2224
- Targeted Preview Generator V2 launch validation: Pass.
25+
- `tools/session-inspector/**` file existence check: Pass.
26+
- Git status includes actual runtime/tool changes: Pass, `tools/session-inspector/js/SessionInspectorApp.js`, `tools/session-inspector/js/bootstrap.js`, and `tools/session-inspector/js/services/SessionInspectorRuntimeContract.js`.
2327
- Full samples smoke test: Skipped by BUILD instruction. This PR is scoped to restoring Session Inspector first-class launch and registry/nav wiring only.
2428

2529
## Changed Files
@@ -34,6 +38,7 @@
3438
- `tools/session-inspector/js/controls/EntryListControl.js`
3539
- `tools/session-inspector/js/controls/FilterControl.js`
3640
- `tools/session-inspector/js/controls/StatusLogControl.js`
41+
- `tools/session-inspector/js/services/SessionInspectorRuntimeContract.js`
3742
- `tools/session-inspector/js/services/SessionInspectorStorageService.js`
3843
- `tools/toolRegistry.js`
3944
- `tools/renderToolsIndex.js`

tools/session-inspector/js/SessionInspectorApp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export class SessionInspectorApp {
55
entryList,
66
filters,
77
refreshButton,
8+
runtimeContract,
89
statusLog,
910
storageService
1011
}) {
@@ -14,6 +15,7 @@ export class SessionInspectorApp {
1415
this.entryList = entryList;
1516
this.filters = filters;
1617
this.refreshButton = refreshButton;
18+
this.runtimeContract = runtimeContract || { storageAccess: "read-only" };
1719
this.statusLog = statusLog;
1820
this.storageService = storageService;
1921
this.selectedId = "";
@@ -30,7 +32,7 @@ export class SessionInspectorApp {
3032
});
3133
this.refreshButton.addEventListener("click", () => this.refresh());
3234
this.refresh({ silent: true });
33-
this.statusLog.ok("Session Inspector ready. Storage is read-only.");
35+
this.statusLog.ok(`Session Inspector ready. Storage is ${this.runtimeContract.storageAccess}.`);
3436
}
3537

3638
refresh({ silent = false } = {}) {

tools/session-inspector/js/bootstrap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { DetailsControl } from "./controls/DetailsControl.js";
44
import { EntryListControl } from "./controls/EntryListControl.js";
55
import { FilterControl } from "./controls/FilterControl.js";
66
import { StatusLogControl } from "./controls/StatusLogControl.js";
7+
import { sessionInspectorRuntimeContract } from "./services/SessionInspectorRuntimeContract.js";
78
import { SessionInspectorStorageService } from "./services/SessionInspectorStorageService.js";
89

910
function requireElement(selector) {
@@ -29,6 +30,7 @@ window.addEventListener("DOMContentLoaded", () => {
2930
summary: requireElement("#sessionSummary")
3031
}),
3132
refreshButton: requireElement("#refreshSessionButton"),
33+
runtimeContract: sessionInspectorRuntimeContract(),
3234
statusLog: new StatusLogControl({
3335
clearButton: requireElement("#clearStatusButton"),
3436
output: requireElement("#statusLog")
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const SESSION_INSPECTOR_RUNTIME_CONTRACT = Object.freeze({
2+
communicatesWithTools: false,
3+
storageAccess: "read-only",
4+
toolId: "session-inspector",
5+
usesRepoSelection: false,
6+
writesStorage: false
7+
});
8+
9+
export function sessionInspectorRuntimeContract() {
10+
return { ...SESSION_INSPECTOR_RUNTIME_CONTRACT };
11+
}

0 commit comments

Comments
 (0)