Skip to content

Commit 239892b

Browse files
author
DavidQ
committed
Adjust Session Inspector V2 storage tile width and metadata spacing - PR_26128_016-session-inspector-v2-tile-sizing
1 parent 07620fd commit 239892b

5 files changed

Lines changed: 87 additions & 16 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# PR_26128_016 Playwright Session Inspector V2 Tile Sizing
2+
3+
## Command
4+
`npm run test:workspace-v2`
5+
6+
## Result
7+
PASS: 14/14 tests passed.
8+
9+
## Targeted Coverage
10+
- Session Inspector V2 storage tiles render at 234px by 198px.
11+
- Tile width is 50px wider than the prior 184px fixed tile.
12+
- The value type and byte size line renders separately from the storage type line.
13+
- The value type and byte size line has visible spacing below storage type.
14+
- A boolean session value renders the expected `boolean | 4 bytes` metadata line.
15+
- Long storage key names still wrap within the fixed tile bounds.
16+
- Delete buttons remain inside each tile.
17+
- Per-tile Delete still removes the correct sessionStorage key and refreshes the list.
18+
- Delete All still clears displayed entries.
19+
- Fullscreen shell behavior still enters/exits and keeps V2 side panel alignment.
20+
21+
## Skipped
22+
Full samples smoke test was skipped as requested because this PR changes Session Inspector V2 tile sizing and metadata positioning only, without touching sample JSON or sample runtime paths.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# PR_26128_016 Session Inspector V2 Tile Sizing
2+
3+
## Summary
4+
Session Inspector V2 storage tiles were widened and their metadata layout was clarified without changing fullscreen or workspace navigation behavior.
5+
6+
## Changes
7+
- Increased fixed storage tile width from 184px to 234px.
8+
- Preserved the existing 198px tile height.
9+
- Split tile metadata into separate lines:
10+
- storage type
11+
- value type and byte size
12+
- Moved the value type and byte size line below the storage type line with additional spacing.
13+
- Preserved long storage key wrapping inside the tile.
14+
- Preserved per-tile Delete button placement inside each tile.
15+
- Preserved Delete All behavior.
16+
- Left fullscreen shell behavior and workspace navigation behavior unchanged.
17+
18+
## Boundaries
19+
- No cross-tool communication was added.
20+
- No sample JSON was modified.
21+
- Roadmap content was not modified.
22+
23+
## Validation
24+
- `npm run test:workspace-v2`: PASS, 14 tests passed.
25+
- Verified tile width increased by 50px to 234px.
26+
- Verified tile height remains 198px.
27+
- Verified `value type | byte size` appears below the storage type line with visible spacing.
28+
- Verified long storage key names still wrap inside tiles.
29+
- Verified Delete buttons still fit inside tiles.
30+
- Verified fullscreen still works.
31+
32+
## Skipped
33+
Full samples smoke test was skipped as requested. This PR is scoped to Session Inspector V2 tile sizing and metadata placement; sample runtime behavior is outside the changed surface.

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,9 @@ test.describe("Workspace Manager V2 bootstrap", () => {
380380

381381
test("launches Session Inspector V2 with V2 labels, accordions, theme, and delete controls", async ({ page }) => {
382382
const pageErrors = [];
383+
await page.setViewportSize({ height: 900, width: 1440 });
383384
await page.addInitScript(() => {
384-
window.sessionStorage.setItem("session-inspector-v2-alpha", JSON.stringify({ active: true }));
385+
window.sessionStorage.setItem("session-inspector-v2-alpha", "true");
385386
window.sessionStorage.setItem("session-inspector-v2-beta", "plain beta value");
386387
window.sessionStorage.setItem("session-inspector-v2-gamma", JSON.stringify({ index: 3, wraps: true }));
387388
window.sessionStorage.setItem("session-inspector-v2-delta", "delta value that is long enough to prove tile text clips inside a fixed tile");
@@ -430,7 +431,6 @@ test.describe("Workspace Manager V2 bootstrap", () => {
430431
expect(tileText).not.toContain("plain beta value");
431432
expect(tileText).not.toContain("delta value that is long enough");
432433
expect(tileText).not.toContain("epsilon value");
433-
expect(tileText).not.toContain("active");
434434
expect(tileText).not.toContain("wraps");
435435

436436
const themeState = await page.evaluate(async () => {
@@ -528,19 +528,26 @@ test.describe("Workspace Manager V2 bootstrap", () => {
528528
deleteButtonsInside: rects.every((rect) => rect.deleteInside),
529529
firstRowMovesLeftToRight: rects[1].top === rects[0].top && rects[1].left > rects[0].left,
530530
hasWrappedRows: new Set(rects.map((rect) => rect.top)).size > 1,
531-
sizes: rects.map(({ height, width }) => ({ height, width }))
531+
metadataGap: Math.round(cards[0].querySelector(".session-inspector-v2__entry-value-size").getBoundingClientRect().top
532+
- cards[0].querySelector(".session-inspector-v2__entry-storage-type").getBoundingClientRect().bottom),
533+
sizes: rects.map(({ height, width }) => ({ height, width })),
534+
storageTypeText: cards[0].querySelector(".session-inspector-v2__entry-storage-type").textContent.trim(),
535+
valueSizeText: cards[0].querySelector(".session-inspector-v2__entry-value-size").textContent.trim()
532536
};
533537
});
534538
expect(tileState.sizes).toEqual([
535-
{ height: 198, width: 184 },
536-
{ height: 198, width: 184 },
537-
{ height: 198, width: 184 },
538-
{ height: 198, width: 184 },
539-
{ height: 198, width: 184 }
539+
{ height: 198, width: 234 },
540+
{ height: 198, width: 234 },
541+
{ height: 198, width: 234 },
542+
{ height: 198, width: 234 },
543+
{ height: 198, width: 234 }
540544
]);
541545
expect(tileState.firstRowMovesLeftToRight).toBe(true);
542546
expect(tileState.hasWrappedRows).toBe(true);
543547
expect(tileState.deleteButtonsInside).toBe(true);
548+
expect(tileState.storageTypeText).toBe("sessionStorage");
549+
expect(tileState.valueSizeText).toBe("boolean | 4 bytes");
550+
expect(tileState.metadataGap).toBeGreaterThanOrEqual(8);
544551
const longKeyWrapState = await page.locator(".session-inspector-v2__entry-card", { hasText: "session-inspector-v2-super-long-storage-key-name-that-must-wrap-inside-the-fixed-session-tile" }).locator(".session-inspector-v2__entry-key").evaluate((keyNode) => {
545552
const keyRect = keyNode.getBoundingClientRect();
546553
const cardRect = keyNode.closest(".session-inspector-v2__entry-card").getBoundingClientRect();

tools/session-inspector-v2/js/controls/EntryListControl.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ export class EntryListControl {
3939
key.className = "session-inspector-v2__entry-key";
4040
key.textContent = entry.key;
4141

42-
const meta = document.createElement("span");
43-
meta.className = "session-inspector-v2__entry-meta";
44-
meta.textContent = `${entry.storageType} | ${entry.valueType} | ${entry.sizeBytes} bytes`;
42+
const storageType = document.createElement("span");
43+
storageType.className = "session-inspector-v2__entry-storage-type";
44+
storageType.textContent = entry.storageType;
4545

46-
button.append(key, meta);
46+
const valueSize = document.createElement("span");
47+
valueSize.className = "session-inspector-v2__entry-value-size";
48+
valueSize.textContent = `${entry.valueType} | ${entry.sizeBytes} bytes`;
49+
50+
button.append(key, storageType, valueSize);
4751
button.addEventListener("click", () => {
4852
this.selectedId = entry.id;
4953
this.onSelected(entry.id);

tools/session-inspector-v2/styles/sessionInspectorV2.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ button:hover {
289289

290290
.session-inspector-v2__entry-list {
291291
display: grid;
292-
grid-template-columns: repeat(auto-fill, 184px);
292+
grid-template-columns: repeat(auto-fill, 234px);
293293
grid-auto-rows: 198px;
294294
align-content: start;
295295
justify-content: start;
@@ -302,9 +302,9 @@ button:hover {
302302
}
303303

304304
.session-inspector-v2__entry-card {
305-
width: 184px;
305+
width: 234px;
306306
height: 198px;
307-
min-width: 184px;
307+
min-width: 234px;
308308
min-height: 198px;
309309
display: flex;
310310
flex-direction: column;
@@ -351,7 +351,8 @@ button:hover {
351351
font-weight: 800;
352352
}
353353

354-
.session-inspector-v2__entry-meta {
354+
.session-inspector-v2__entry-storage-type,
355+
.session-inspector-v2__entry-value-size {
355356
min-width: 0;
356357
display: block;
357358
overflow: hidden;
@@ -363,6 +364,10 @@ button:hover {
363364
word-break: break-word;
364365
}
365366

367+
.session-inspector-v2__entry-value-size {
368+
margin-top: 8px;
369+
}
370+
366371
.session-inspector-v2__output,
367372
#statusLog {
368373
width: 100%;

0 commit comments

Comments
 (0)