Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- Keyboard users can now Tab to an overflowing conversation transcript in Studio and scroll it with the keyboard, with a visible focus outline; transcripts that (#6057).

- Contributing: the pull request template asks speedup PRs for a tools/perf_receipt.py receipt.

- CI: three host checks that pass on main run in the Linux test shards again, after sitting on an old exclusion list (#6017). Thanks to @joshuaswarren.



- Repository: the Ergo model's license text is no longer kept with the Vulkan engine's source; it travels with the checkpoint.

- Build: `zig build native` for CUDA fails with a clear message when it would embed no kernel images, instead of building a server that refuses every model (#6011). Thanks to @joshuaswarren.
Expand All @@ -22,8 +22,6 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

- Handoff manifest: a zero dimension empties a layer's row wherever it is listed, so the same dimensions are accepted or refused independently of their order; a row that really wraps is still refused (#5979, refs #5844).



- CI: performance PRs can carry a receipt (mirrored A/B plus a greedy token hash with a planted control); a check verifies it, and a trusted follow-up compares the hashes with maintainer-held golden values.

- Server: a streamed GLM tool call's header is sent only after its whole envelope parses, so a malformed call can no longer reach the client as raw text after a header delta; non-streamed replies are unchanged (refs #6031).
Expand Down Expand Up @@ -85,8 +83,6 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

- Lanes: a backend may say before a verify that a stream's next rows find no memory (`Backend.grow`); that stream ends with `length` and a message, and the round's other streams run on instead of the whole round failing. Qwen3.8-27B on Metal with `TF_QWEN27_METAL_KV_PAGES=1` says so when a slot's next rows find no KV page (#3378, part of #1293).



- Metal tensor parallel: opt-in `TF_TP_HOST_SYNC=1` exchanges through the CPU and shared events instead of GPU kernels spinning on peer-written flags, for macOS releases where those writes are not seen (#5943).

- `TENSORFOLD_PREFILL_POLICY=fcfs` keeps a backend's own prompt cut unless the backend declares chunk invariance, so the policy no longer changes output on Flash Next or Gemma 4 on CUDA.
Expand Down
13 changes: 13 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ npm run verify # non-build preflight: tests + typecheck + git diff checks
`npm test` includes guards that fail when a `*.test.ts`, `*.test.tsx`, or `*.test.mjs` file is not
wired into the main test suite, or when source/docs contain non-placeholder email addresses.

To check transcript keyboard navigation, start the browser demo from `app/` with
`npm run dev:web` (on PowerShell, set `$env:VONTRA_NO_ELECTRON = '1'` and run `npm run dev`).
In another terminal in `app/`, run this standalone check with Playwright and Chromium available locally:

```bash
node scripts/check-transcript-keyboard.mjs http://127.0.0.1:5173/
```

Use the demo's actual port. If Playwright is installed outside `app/`, pass its absolute module
path as the next argument. You can pass a Chromium executable path as the final argument.
The check verifies Tab and Page Down on an overflowing transcript and skips the transcript
in the tab order when it is empty.

### Phone control from chat

Open **Phone** beside the model picker in a chat, refresh devices and connect your phone.
Expand Down
68 changes: 68 additions & 0 deletions app/scripts/check-transcript-keyboard.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import assert from 'node:assert/strict'
import { createRequire } from 'node:module'

// Run against Studio's browser demo with a locally installed Playwright and Chromium.
const [url = 'http://127.0.0.1:5173/', playwright = 'playwright', executablePath] = process.argv.slice(2)
const origin = new URL(url)
assert.ok(['127.0.0.1', 'localhost'].includes(origin.hostname), 'Use a loopback Studio demo URL')
let chromium
try {
({ chromium } = createRequire(import.meta.url)(playwright))
} catch (error) {
throw new Error('Could not load Playwright. Pass the absolute path to its module as the second argument. See app/README.md.', { cause: error })
}
const browser = await chromium.launch({ executablePath })

try {
const page = await browser.newPage({ viewport: { width: 1280, height: 900 } })
await page.route('**/*', route => new URL(route.request().url()).origin === origin.origin ? route.continue() : route.abort())
await page.goto(origin.href, { waitUntil: 'domcontentloaded', timeout: 90_000 })
const fixture = count => page.evaluate(async ({ count, chat }) => {
const { useStore } = await import('/src/lib/store.ts')
const state = useStore.getState()
const timeline = Array.from({ length: count }, (_, index) => ({
id: `keyboard-fixture-${index}`, kind: 'notice', text: `Synthetic transcript line ${index}`, createdAt: index + 1,
}))
useStore.setState({ threads: [{ ...chat, incognito: true, timeline }, ...state.threads.filter(row => row.id !== chat.id)] })
}, { count, chat })

const scroller = page.locator('div.scroll-thin.overflow-y-auto.select-text')
const exportButton = page.getByRole('button', { name: 'Export readable text', exact: true })
const composer = page.getByRole('textbox', { name: 'Message composer', exact: true })
await page.locator('#root > *').first().waitFor({ state: 'attached' })
const chat = await page.evaluate(async () => {
const { useStore } = await import('/src/lib/store.ts')
await useStore.getState().newChat()
const { threads, view } = useStore.getState()
const thread = threads.find(thread => thread.id === view.id)
if (!thread) throw new Error('Studio demo did not create the chat')
useStore.setState({ threads: threads.filter(row => row.id !== thread.id) })
return thread
})
await page.getByRole('heading', { name: 'Conversation unavailable' }).waitFor()
await fixture(35)
await page.getByText('Synthetic transcript line 0', { exact: true }).waitFor()
assert.ok(await scroller.evaluate(node => node.scrollHeight > node.clientHeight), 'The long fixture must overflow')
assert.equal(await scroller.getAttribute('tabindex'), '0', 'The scroller must have an explicit tab stop')
await exportButton.focus()
await page.keyboard.press('Tab')
assert.equal(await scroller.evaluate(node => node === document.activeElement), true, 'Tab reaches the transcript')
assert.equal(await scroller.evaluate(node => getComputedStyle(node).outlineStyle), 'solid', 'Keyboard focus has a visible outline')
await page.keyboard.press('Home')
await page.waitForFunction(() => document.activeElement.scrollTop === 0)
await page.keyboard.press('PageDown')
await page.waitForFunction(() => document.activeElement.scrollTop > 0)
await page.keyboard.press('Tab')
assert.equal(await composer.evaluate(node => node === document.activeElement), true, 'Tab continues to the composer')

await fixture(0)
await page.getByText('Synthetic transcript line 0', { exact: true }).waitFor({ state: 'hidden' })
assert.ok(await scroller.evaluate(node => node.scrollHeight <= node.clientHeight), 'The empty fixture must fit')
await scroller.and(page.locator('[tabindex="-1"]')).waitFor()
await exportButton.focus()
await page.keyboard.press('Tab')
assert.equal(await scroller.evaluate(node => !node.contains(document.activeElement)), true, 'Tab skips the empty transcript')
console.log('Desktop transcript keyboard check passed for overflowing and empty conversations')
} finally {
await browser.close()
}
34 changes: 31 additions & 3 deletions app/src/components/Thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ReadableExportDialog } from './reading/ReadableExportDialog'
import { requestConversationSearch } from './search/search-events'
import { useConversationSearchTarget } from './search/useConversationSearchTarget'
import { SentUserMessage, EarlierMessageRevisions } from './SentUserMessage'
import { useEffect, useMemo, useRef, useState } from 'react'
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
import { threadPendingApproval } from '../lib/thread-approval'
import { useStore } from '../lib/store'
import { api } from '../lib/ipc'
Expand Down Expand Up @@ -60,6 +60,8 @@ export function ThreadView({ threadId, simpleLayout = false }: { threadId: strin
const [reviewOpen, setReviewOpen] = useState(false)
const [exportOpen, setExportOpen] = useState(false)
const scrollRef = useRef<HTMLDivElement>(null)
const transcriptContentRef = useRef<HTMLDivElement>(null)
const [transcriptOverflows, setTranscriptOverflows] = useState(false)
const endRef = useRef<HTMLDivElement>(null)
const followRef = useRef(true)
const [revealedTurns, setRevealedTurns] = useState<Record<string, number>>({})
Expand Down Expand Up @@ -98,6 +100,25 @@ export function ThreadView({ threadId, simpleLayout = false }: { threadId: strin
const searchTarget = useConversationSearchTarget({ threadId, timeline, rows: turnRows, scrollRef, followRef,
revealWork: key => setRevealedTurns(previous => ({ ...previous, [key]: (previous[key] ?? 0) + 1 })) })
const transcriptWindow = useTranscriptWindow(threadId, turnRows, searchTarget.itemId, scrollRef)
const hasThread = Boolean(thread)
useLayoutEffect(() => {
const scroller = scrollRef.current
const content = transcriptContentRef.current
if (!scroller || !content) return

let measuredOverflow: boolean | undefined
const measure = () => {
const next = scroller.clientHeight > 0 && scroller.scrollHeight > scroller.clientHeight
if (next === measuredOverflow) return
measuredOverflow = next
setTranscriptOverflows(next)
}
const observer = new ResizeObserver(measure)
observer.observe(scroller)
observer.observe(content)
measure()
return () => observer.disconnect()
}, [hasThread, threadId])
const userTurns = useMemo(() => timeline.filter((item) => item.kind === 'user').length, [timeline])
// Turns that have a checkpoint can be undone from their edits card.
const [checkpointTurns, setCheckpointTurns] = useState<Set<number>>(() => new Set())
Expand Down Expand Up @@ -224,8 +245,15 @@ export function ThreadView({ threadId, simpleLayout = false }: { threadId: strin
{reviewOpen && <RunOutcomeReviewDialog key={threadId} thread={thread} onClose={() => setReviewOpen(false)} />}
{exportOpen && <ReadableExportDialog key={threadId} threadId={threadId} messages={timeline.filter(item => item.kind === 'user' || item.kind === 'assistant').map((item, index) => ({ id: item.id, label: `${index + 1}. ${item.kind === 'user' ? 'You' : 'Assistant'}: ${(item.text || '').slice(0, 90)}` }))} api={api} onClose={() => setExportOpen(false)} />}
{searchTarget.notice && <div role="status" className="flex items-center gap-3 border-b border-line bg-card px-6 py-2 text-[12px] text-ink-2"><span className="flex-1">{searchTarget.notice}</span><button type="button" className="rounded px-2 py-1 text-accent focus-visible:outline-2 focus-visible:outline-accent" onClick={searchTarget.clear}>{tx("Clear match")}</button></div>}
<div ref={scrollRef} onScroll={onScroll} className="scroll-thin min-h-0 flex-1 overflow-y-auto select-text">
<div className="mx-auto w-full max-w-3xl space-y-4 px-6 pb-8 pt-12">
<div
ref={scrollRef}
onScroll={onScroll}
tabIndex={transcriptOverflows ? 0 : -1}
role={transcriptOverflows ? 'region' : undefined}
aria-label={transcriptOverflows ? tx("Conversation") : undefined}
className="scroll-thin min-h-0 flex-1 overflow-y-auto select-text focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent"
>
<div ref={transcriptContentRef} className="mx-auto w-full max-w-3xl space-y-4 px-6 pb-8 pt-12">
{thread.bot && <BotChatContext thread={thread} />}
<EarlierMessageRevisions thread={thread} />
{simpleLayout && thread.kind === 'chat' && !timeline.length && !busy && <div className="flex min-h-[220px] flex-col items-center justify-center gap-4 px-2 text-center">
Expand Down
Loading