Skip to content

Commit d3146dc

Browse files
committed
feat(web): flatten mobile session chrome
1 parent 085910c commit d3146dc

2 files changed

Lines changed: 65 additions & 11 deletions

File tree

packages/web/src/styles/components.css

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8597,14 +8597,15 @@ textarea.input {
85978597
flex-direction: column;
85988598
min-height: 0;
85998599
overflow: hidden;
8600-
padding: var(--sp-2) var(--mobile-safe-right) 0 var(--mobile-safe-left);
8600+
padding: 0;
8601+
border-top: 1px solid color-mix(in srgb, var(--border) 42%, transparent);
86018602
}
86028603

86038604
.mobile-shell__content {
86048605
display: flex;
86058606
flex-direction: column;
86068607
flex: 1;
8607-
gap: var(--sp-3);
8608+
gap: 4px;
86088609
min-height: 0;
86098610
overflow: hidden;
86108611
}
@@ -8635,6 +8636,10 @@ textarea.input {
86358636
min-width: 0;
86368637
}
86378638

8639+
.mobile-shell__agent-stage .session-progress {
8640+
display: none;
8641+
}
8642+
86388643
.mobile-shell__agent-stage .xterm-host-shell,
86398644
.mobile-shell__agent-stage .xterm-host {
86408645
flex: 1 1 auto;
@@ -8820,8 +8825,11 @@ textarea.input {
88208825
}
88218826

88228827
.mobile-shell__agent-stage .session-header {
8823-
padding: var(--sp-2) calc(var(--mobile-safe-right) + var(--sp-3)) var(--sp-2)
8828+
padding: 4px calc(var(--mobile-safe-right) + var(--sp-3)) 4px
88248829
calc(var(--mobile-safe-left) + var(--sp-3));
8830+
gap: var(--sp-2);
8831+
background: color-mix(in srgb, var(--bg-page) 96%, var(--bg-surface) 4%);
8832+
border-bottom: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
88258833
}
88268834

88278835
.mobile-shell__agent-stage .session-header-left,
@@ -8830,8 +8838,8 @@ textarea.input {
88308838
min-width: 0;
88318839
}
88328840

8833-
.mobile-shell__agent-stage .session-header {
8834-
gap: var(--sp-2);
8841+
.mobile-shell__agent-stage .session-header-left {
8842+
gap: 6px;
88358843
}
88368844

88378845
.mobile-shell__agent-stage .session-header-right {
@@ -8842,7 +8850,7 @@ textarea.input {
88428850
.mobile-shell__agent-stage .session-title-row {
88438851
display: flex;
88448852
align-items: center;
8845-
gap: var(--sp-2);
8853+
gap: 6px;
88468854
min-width: 0;
88478855
flex-wrap: nowrap;
88488856
}
@@ -8857,20 +8865,26 @@ textarea.input {
88578865

88588866
.mobile-shell__agent-stage .session-provider-badge,
88598867
.mobile-shell__agent-stage .session-state-badge {
8868+
height: 15px;
8869+
padding: 0 5px;
8870+
border-radius: 3px;
8871+
font-size: 10px;
88608872
flex-shrink: 0;
88618873
max-width: 100%;
88628874
}
88638875

88648876
.mobile-shell__agent-stage .mobile-supervisor-badge {
8865-
min-height: 32px;
8877+
min-height: 26px;
88668878
max-width: 100%;
8867-
padding: 0 var(--sp-2);
8868-
border-radius: var(--radius-lg);
8879+
padding: 0 8px;
8880+
border-radius: 4px;
8881+
border-color: color-mix(in srgb, var(--border) 78%, var(--accent-blue) 22%);
8882+
background: color-mix(in srgb, var(--accent-blue) 6%, var(--bg-page) 94%);
88698883
}
88708884

88718885
.mobile-shell__agent-stage .mobile-supervisor-badge__label {
88728886
max-width: 100%;
8873-
font-size: var(--text-xs);
8887+
font-size: 11px;
88748888
}
88758889

88768890
.mobile-dock {
@@ -10719,7 +10733,7 @@ textarea.input {
1071910733
}
1072010734

1072110735
.mobile-shell--landscape-compact .mobile-shell__viewport {
10722-
padding-top: var(--sp-1);
10736+
padding-top: 0;
1072310737
padding-bottom: 0;
1072410738
}
1072510739

packages/web/src/styles/components.theme.test.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,46 @@ describe("components.css theme-sensitive surfaces", () => {
12311231
expect(badges).toContain("max-width: 100%");
12321232
});
12331233

1234+
it("keeps the mobile active session chrome visually flat and aligned with the shell header", () => {
1235+
const viewport = getLastRuleBlock(".mobile-shell__viewport");
1236+
const content = getLastRuleBlock(".mobile-shell__content");
1237+
const landscapeViewport = getLastRuleBlock(
1238+
".mobile-shell--landscape-compact .mobile-shell__viewport"
1239+
);
1240+
const sessionCard = getLastRuleBlock(".mobile-shell__agent-stage > .session-card");
1241+
const progress = getLastRuleBlock(".mobile-shell__agent-stage .session-progress");
1242+
const header = getLastRuleBlock(".mobile-shell__agent-stage .session-header");
1243+
const headerLeft = getLastRuleBlock(".mobile-shell__agent-stage .session-header-left");
1244+
const titleRow = getLastRuleBlock(".mobile-shell__agent-stage .session-title-row");
1245+
const badges = getLastGroupedRuleBlock(
1246+
/\.mobile-shell__agent-stage \.session-provider-badge,\s*\.mobile-shell__agent-stage \.session-state-badge\s*\{([^}]*)\}/g
1247+
);
1248+
const supervisorBadge = getLastRuleBlock(".mobile-shell__agent-stage .mobile-supervisor-badge");
1249+
const supervisorLabel = getLastRuleBlock(
1250+
".mobile-shell__agent-stage .mobile-supervisor-badge__label"
1251+
);
1252+
1253+
expect(viewport).toContain("padding: 0");
1254+
expect(viewport).toContain("border-top:");
1255+
expect(viewport).not.toContain("padding: 4px");
1256+
expect(landscapeViewport).toContain("padding-top: 0");
1257+
expect(content).toContain("gap: 4px");
1258+
expect(sessionCard).toContain("border-radius: 0");
1259+
expect(sessionCard).toContain("box-shadow: none");
1260+
expect(progress).toContain("display: none");
1261+
expect(header).toContain("padding: 4px");
1262+
expect(header).toContain("border-bottom:");
1263+
expect(header).not.toContain("linear-gradient(");
1264+
expect(headerLeft).toContain("gap: 6px");
1265+
expect(titleRow).toContain("gap: 6px");
1266+
expect(badges).toContain("height: 15px");
1267+
expect(badges).toContain("border-radius: 3px");
1268+
expect(supervisorBadge).toContain("min-height: 26px");
1269+
expect(supervisorBadge).toContain("border-radius: 4px");
1270+
expect(supervisorBadge).not.toContain("border-radius: var(--radius-lg)");
1271+
expect(supervisorLabel).toContain("font-size: 11px");
1272+
});
1273+
12341274
it("keeps supervisor entry icons and labels vertically centered", () => {
12351275
const desktopButton = getLastRuleBlock(".supervisor-enable-btn");
12361276
const desktopButtonIcon = getLastRuleBlock(".supervisor-enable-btn > .themed-icon");

0 commit comments

Comments
 (0)