Skip to content

Commit 1cdba71

Browse files
authored
Fix feedback regressions in Desktop, Analytics, and Slides (#4824)
* Fix feedback regressions in Desktop and Analytics * Address Analytics coverage review * Verify generated Slides layouts
1 parent a62611f commit 1cdba71

8 files changed

Lines changed: 64 additions & 90 deletions

File tree

packages/desktop-app/src/renderer/shell.css

Lines changed: 3 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ body {
349349
-webkit-app-region: drag;
350350
}
351351

352-
/* Collapsed macOS rails use a fixed-width custom cluster because native
353-
traffic lights cannot expose only two buttons. Keep it at shell level so it
354-
remains above the settings surface. */
352+
/* Collapsed macOS rails use a fixed-width custom cluster while the native
353+
traffic lights are hidden. Keep it at shell level so it remains above the
354+
settings surface. */
355355
.desktop-chat-first-mac-window-controls {
356356
display: none;
357357
}
@@ -373,33 +373,12 @@ body {
373373
-webkit-app-region: no-drag;
374374
}
375375

376-
.collapsed-mac-window-controls::before {
377-
position: absolute;
378-
z-index: 0;
379-
top: -3px;
380-
left: -5px;
381-
width: 78px;
382-
height: 28px;
383-
border: 1px solid hsl(var(--sidebar-foreground) / 0.14);
384-
border-radius: 999px;
385-
background-color: hsl(var(--sidebar-background));
386-
box-shadow: 0 4px 14px hsl(var(--sidebar-background) / 0.42);
387-
content: "";
388-
opacity: 0;
389-
pointer-events: none;
390-
transition: opacity var(--ease-collapse);
391-
}
392-
393376
.collapsed-mac-window-controls .win-btn {
394377
position: absolute;
395-
z-index: 1;
396378
top: 5px;
397379
width: 12px;
398380
height: 12px;
399381
padding: 0;
400-
transition:
401-
opacity var(--ease-collapse),
402-
transform var(--ease-collapse);
403382
}
404383

405384
.collapsed-mac-window-controls .win-btn--close {
@@ -412,42 +391,6 @@ body {
412391

413392
.collapsed-mac-window-controls .win-btn--maximize {
414393
left: 50px;
415-
opacity: 0;
416-
pointer-events: none;
417-
transform: translateX(-4px) scale(0.8);
418-
}
419-
420-
.collapsed-mac-window-controls:hover::before,
421-
.collapsed-mac-window-controls:focus-within::before {
422-
opacity: 1;
423-
}
424-
425-
.collapsed-mac-window-controls:hover .win-btn--maximize,
426-
.collapsed-mac-window-controls:focus-within .win-btn--maximize {
427-
opacity: 1;
428-
pointer-events: auto;
429-
transform: translateX(0) scale(1);
430-
}
431-
432-
.platform-darwin
433-
.shell:has(.settings-overlay)
434-
.collapsed-mac-window-controls::before,
435-
.platform-darwin
436-
.shell:has(.settings-overlay)
437-
.collapsed-mac-window-controls:hover::before,
438-
.platform-darwin
439-
.shell:has(.settings-overlay)
440-
.collapsed-mac-window-controls:focus-within::before {
441-
opacity: 0;
442-
}
443-
444-
.platform-darwin
445-
.shell:has(.settings-overlay)
446-
.collapsed-mac-window-controls
447-
.win-btn--maximize {
448-
opacity: 1;
449-
pointer-events: auto;
450-
transform: translateX(0) scale(1);
451394
}
452395

453396
.collapsed-mac-window-controls .win-btn:focus-visible {
@@ -1079,14 +1022,9 @@ body {
10791022
@media (prefers-reduced-motion: reduce) {
10801023
.desktop-chat-first-mac-window-controls,
10811024
.collapsed-mac-window-controls,
1082-
.collapsed-mac-window-controls::before,
10831025
.collapsed-mac-window-controls .win-btn {
10841026
transition: none;
10851027
}
1086-
1087-
.collapsed-mac-window-controls .win-btn--maximize {
1088-
transform: none;
1089-
}
10901028
}
10911029

10921030
.desktop-chat-first-hub .code-agents-rail-footer .update-indicator--pending,

packages/desktop-app/src/renderer/window-controls.spec.ts

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,15 @@ describe("chat-first macOS window controls", () => {
2929
);
3030
});
3131

32-
it("keeps the green control available while moving across the hover gap", () => {
33-
expect(shellCss).toContain(".collapsed-mac-window-controls::before {");
34-
expect(shellCss).toContain("opacity: 0;");
35-
expect(shellCss).toContain("transition: opacity var(--ease-collapse);");
36-
expect(shellCss).toContain(".collapsed-mac-window-controls:hover::before,");
37-
expect(shellCss).toContain(
38-
".collapsed-mac-window-controls:hover .win-btn--maximize,",
32+
it("shows all three collapsed controls without hover chrome", () => {
33+
expect(shellCss).not.toContain(".collapsed-mac-window-controls::before");
34+
expect(shellCss).not.toContain(".collapsed-mac-window-controls:hover");
35+
expect(shellCss).not.toContain(
36+
".collapsed-mac-window-controls:focus-within",
3937
);
40-
expect(shellCss).not.toContain(".collapsed-mac-window-controls:has(");
4138
expect(shellCss).toContain(
4239
".collapsed-mac-window-controls .win-btn--maximize {",
4340
);
44-
expect(shellCss).toContain("pointer-events: none;");
45-
expect(shellCss).toContain("opacity: 1;");
46-
expect(shellCss).toContain("pointer-events: auto;");
47-
expect(shellCss).toContain("transform: translateX(0) scale(1);");
48-
});
49-
50-
it("shows all three controls without hover chrome in settings", () => {
51-
expect(shellCss).toContain(
52-
".platform-darwin\n .shell:has(.settings-overlay)\n .collapsed-mac-window-controls::before,",
53-
);
54-
expect(shellCss).toContain(".collapsed-mac-window-controls:hover::before,");
55-
expect(shellCss).toContain(
56-
".platform-darwin\n .shell:has(.settings-overlay)\n .collapsed-mac-window-controls\n .win-btn--maximize {\n opacity: 1;\n pointer-events: auto;\n transform: translateX(0) scale(1);",
57-
);
41+
expect(shellCss).not.toContain("translateX(-4px) scale(0.8)");
5842
});
5943
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
type: fixed
3+
date: 2026-09-11
4+
---
5+
6+
Coverage-sensitive searches now return a clearly labeled partial answer when a full provider scan cannot finish

templates/analytics/server/lib/real-data-actions.spec.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,32 @@ describe("coverage-sensitive analytics request classification", () => {
604604
}),
605605
).toBe(false);
606606

607+
expect(
608+
needsCorpusWorkflowForCoverageSensitiveRequest({
609+
userText: broadProviderQuestion,
610+
finalText:
611+
"This is a partial answer based on the first 20 calls; I found zero mentions.",
612+
toolResults: shortcutOnly,
613+
}),
614+
).toBe(false);
615+
616+
expect(
617+
needsCorpusWorkflowForCoverageSensitiveRequest({
618+
userText: broadProviderQuestion,
619+
finalText: "Partial coverage. I found zero mentions.",
620+
toolResults: shortcutOnly,
621+
}),
622+
).toBe(true);
623+
624+
expect(
625+
needsCorpusWorkflowForCoverageSensitiveRequest({
626+
userText: broadProviderQuestion,
627+
finalText:
628+
"I need a provider API/corpus workflow, or I need to label the answer as partial with exact inspected counts and gaps.",
629+
toolResults: shortcutOnly,
630+
}),
631+
).toBe(true);
632+
607633
expect(
608634
needsCorpusWorkflowForCoverageSensitiveRequest({
609635
userText: broadProviderQuestion,

templates/analytics/server/lib/real-data-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ const EXPLICIT_FULL_COVERAGE_CONFIDENCE_CLAIM =
11101110
const GENERIC_FULL_COVERAGE_CLAIM = /\b(?:exhaustive|complete)\b/i;
11111111

11121112
const EXPLICIT_PARTIAL_DISCLOSURE =
1113-
/\b(?:partial|partially|sample|sampled|subset|not exhaustive|non-exhaustive|incomplete|truncated|aborted|timed out|coverage gap|could not inspect|only inspected|only searched|only reviewed|first \d+|top \d+|returned \d+|remaining|unsearched|uninspected|unreviewed|not covered|uncovered|missing coverage)\b|\b(?:bounded|limited)\s+(?:coverage|sample|results?|records?|calls?|transcripts?|cohort|dataset|evidence|inspection|search|review)\b|\b(?:coverage|inspection|search|review|sample)\s+(?:was|is|remains|looks)?\s*(?:bounded|limited)\b|\b(?:inspected|searched|reviewed|analy[sz]ed)\s+\d+\s+(?:of|out of)\s+\d+\b/i;
1113+
/\b(?:sample|sampled|subset|not exhaustive|non-exhaustive|incomplete|truncated|aborted|timed out|coverage gap|could not inspect|only inspected|only searched|only reviewed|first \d+|top \d+|returned \d+|remaining|unsearched|uninspected|unreviewed|not covered|uncovered|missing coverage)\b|\b(?:inspected|searched|reviewed|analy[sz]ed)\s+\d+\s+(?:of|out of)\s+\d+\b|\b\d+\s+(?:calls?|records?|transcripts?|deals?|accounts?|customers?|tickets?|issues?|messages?)\s+(?:inspected|searched|reviewed|analy[sz]ed)\b/i;
11141114

11151115
const COVERAGE_SENSITIVE_ANALYTICS_REQUEST =
11161116
/\b(?:all|every|each|entire|complete|full|exhaustive)\b[^.?!]{0,220}\b(?:calls?|records?|transcripts?|deals?|accounts?|customers?|tickets?|issues?|messages?|source records?|cohort|dataset|results?)\b|\b(?:find|surface|search|scan|grep|review|inspect|check|look through)\b[^.?!]{0,220}\b(?:any|all|every|each|mentions?|matches?|examples?|source records?|calls?|records?|transcripts?|deals?|accounts?|customers?|tickets?|issues?|messages?)\b|\b(?:let me know if you surface anything|surface anything|anything around|absence matters|where (?:the )?lack thereof|lack thereof is impacting|no mentions?|zero mentions?)\b/i;

templates/analytics/server/plugins/agent-chat.spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,24 @@ describe("realDataFinalGuard", () => {
11791179
});
11801180
});
11811181

1182+
it("drops an unscoped absence claim after corpus retries are exhausted", () => {
1183+
const result = realDataFinalGuard(
1184+
guardContext({
1185+
userText:
1186+
'Find any closed won deal in HubSpot where products = "fusion", then for all those deals look through all Gong call transcripts after close and let me know if you surface anything around Figma MCP.',
1187+
draftText: "I found zero mentions.",
1188+
toolResults: [{ name: "bigquery", isError: false, content: "[]" }],
1189+
}),
1190+
);
1191+
1192+
expect(result).toMatchObject({
1193+
maxRetries: 2,
1194+
expandToolSurface: true,
1195+
fallbackMessage: expect.stringContaining("exact inspected count"),
1196+
});
1197+
expect(result).not.toHaveProperty("exhaustedDraftPrefix");
1198+
});
1199+
11821200
it("treats a completed catalog/dashboard-reference search as discovery, not a dead end", () => {
11831201
const result = realDataFinalGuard(
11841202
guardContext({

templates/analytics/server/plugins/agent-chat.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,9 @@ export function realDataFinalGuard(
995995
retryMessage:
996996
"The user asked a coverage-sensitive provider question, but the draft only used bounded convenience data actions. Do not finalize an exhaustive, all-records, or absence-sensitive answer from shortcut actions alone. Use the broad provider API/MCP surface and a staged analysis workflow now: provider-api-catalog/provider-api-docs when needed; for Gong, use configured tracker results from /calls/extensive when they cover the term, otherwise use provider-api-request as raw ingestion with stageAs/saveToFile followed by query-staged-dataset or a Data Program; use provider-corpus-job for durable batched raw-transcript scans. Never loop per call from run-code or a delegated agent. For 500 or more Gong records, gong-calls is not the broad-search path. If full coverage is not possible in this turn, finalize with explicit partial-coverage wording, inspected counts, filters, and remaining gaps.",
997997
fallbackMessage:
998-
"I can't make a confident coverage-sensitive provider claim from bounded shortcut actions alone. I need a provider API/corpus workflow, or I need to label the answer as partial with exact inspected counts and gaps.",
998+
"I couldn't verify the full provider corpus after two search attempts. The bounded shortcuts did not report an exact inspected count, filter set, or remaining-gap size, so I won't present their absence claim as corpus-wide.",
999+
maxRetries: 2,
1000+
expandToolSurface: true,
9991001
};
10001002
}
10011003
if (

templates/slides/server/plugins/agent-chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ For source-faithful PDF slides, keep whatever the import produced — positioned
262262
For new decks, resolve precedence in this order: an explicit designSystemId or exact-title designSystem wins, then the caller's personal default, then the workspace default; create-deck applies this itself. Call get-design-system once before the first slide you author, then reuse it. For an existing deck, get-deck's designSystem and deckStyle are the source of truth. For an unlinked deck where the user asks for on-brand styling, call get-workspace-defaults, link its usable design system with patch-deck, then call get-design-system once. Do not improvise a generic Builder-like palette when configured Builder.io design-system context is available. When no design system is available, use the Slides fallback direction: a light warm-neutral canvas, dark ink text, Inter or a close sans-serif, generous 64px by 80px minimum padding, strong title/body scale contrast, and one restrained blue or coral accent. Every slide needs intentional composition - for example a labeled title block, a two-column split, a metric treatment, a rule, a callout, a visual placeholder, or a simple diagram - not an unstyled text dump. Never use a black background with white text as the generic fallback, never omit the padded fmd-slide wrapper, and never let body copy touch the canvas edge.
263263
When adding slides to an existing deck, first read get-deck and match the established visual treatment - background, foreground, typography, spacing, and component language - unless the user explicitly asks to change the theme. Never default continuation slides to a new white or dark theme.
264264
265-
Layout-fit workflow is strict. When the user asks to fix overflow, first call view-screen and inspect the deck-wide layout-fit section. If it says measurements are unknown, do not claim the deck fits. Call get-layout-overflows when you need the structured per-slide results. Read each affected slide with get-deck slideId=<id> (full HTML is returned for a targeted read), then make one bounded structural repair pass with one patch-slide operation per affected slide in a single patch-deck call. Writes return before browser measurement, so continue independent edits while layoutFit.status=pending. At the verification point, call get-layout-overflows once and use only measurements whose contentHash and layoutFitRevision match the current persisted slides. Wait for the repair action result and verify the persisted HTML with get-deck slideId=<id> compact=true before saying it is fixed. If a fresh measurement still reports overflow, make at most one focused follow-up repair based on that measurement; never loop, repeatedly re-measure, or claim success after a chat response alone.
265+
Layout-fit workflow is strict. After creating or structurally rewriting slides, verify their layout in the same turn even when the user did not explicitly ask about overflow. At the final verification point, call get-layout-overflows once and use only measurements whose contentHash and layoutFitRevision match the current persisted slides. If measurements are unknown, do not claim the deck fits. For each measured overflow, read that slide with get-deck slideId=<id> (full HTML is returned for a targeted read), then make one bounded structural repair pass with one patch-slide operation per affected slide in a single patch-deck call. Wait for the repair action result and verify the persisted HTML with get-deck slideId=<id> compact=true before saying it is fixed. If a fresh measurement still reports overflow, make at most one focused follow-up repair based on that measurement; never loop, repeatedly re-measure, or claim success after a chat response alone. When the user asks to fix an existing overflow, first call view-screen and inspect the deck-wide layout-fit section, then follow this same bounded workflow.
266266
267267
Fit means the main content fits the native content area. A small outer-wrapper spill is tolerated by the measurement, but cards, text, columns, and other visible content must fit. Never use zoom, transform: scale(), overflow: hidden/scroll, clipping, or a smaller-than-16px body font to hide overflow. Preserve manually positioned freeform objects and their data-slide-object-id values; repair normal-flow structure, copy, gaps, or slide padding instead. A successful action result must include the affected slide IDs; if it does not, report that no verified write occurred.
268268

0 commit comments

Comments
 (0)