fix(app): keep turn timing inside the footer (#10510)
The Turn stats button narrows the timing column. On web, preserved spaces at soft wraps extend the timing text range past the button. Collapse wrapping spaces for the timing labels and include Turn stats in the existing hover stability check.
This commit is contained in:
1 parent
2d09c47672
commit
91247c8218
2 files changed
+4
-1
No files matched your search
@@ -430,7 +430,8 @@ async function expectFooterWithinWidth(page: Page, width: number): Promise<void>
|
||||
const label = page.getByRole("button", { name: /^Worked for/ }).last();
|
||||
await expect(label).toBeVisible();
|
||||
await expectTimingInsideFooter(page);
|
||||
const controls = footer.getByRole("button", { name: /Copy turn|Fork chat/ });
|
||||
await expect(footer.getByRole("button", { name: "Turn stats" })).toBeVisible();
|
||||
const controls = footer.getByRole("button", { name: /Copy turn|Fork chat|Turn stats/ });
|
||||
const before = await controls.evaluateAll((elements) =>
|
||||
elements.map((element) => {
|
||||
const rect = element.getBoundingClientRect();
|
||||
|
||||
@@ -603,6 +603,8 @@ const assistantTurnFooterStylesheet = StyleSheet.create((theme) => ({
|
||||
flexShrink: 0,
|
||||
color: theme.colors.foregroundMuted,
|
||||
fontSize: STREAM_METADATA_FONT_SIZE,
|
||||
// React Native Web preserves trailing spaces at line wraps by default.
|
||||
...(isWeb ? { whiteSpace: "normal" } : {}),
|
||||
},
|
||||
overlappingLabel: {
|
||||
marginLeft: "-100%",
|
||||
|
||||
Reference in new issue
Block a user