diff --git a/desktop/src/components/workspace/WorkspaceCodeSurface.tsx b/desktop/src/components/workspace/WorkspaceCodeSurface.tsx
index 5dc32076..9ac3b490 100644
--- a/desktop/src/components/workspace/WorkspaceCodeSurface.tsx
+++ b/desktop/src/components/workspace/WorkspaceCodeSurface.tsx
@@ -127,7 +127,7 @@ export function WorkspaceDiffSurface({
return (
{
expect(view.getByRole('button', { name: 'Collapse preview' })).toBeTruthy()
})
+ it('keeps diff rows intrinsically wide so H5 users can scroll sideways', async () => {
+ const longDiffLine = '+const label = "this is a very long generated line that should not be compressed into the phone viewport";'
+
+ await setWorkspaceState((state) => ({
+ ...state,
+ panelBySession: {
+ ...state.panelBySession,
+ 'session-wide-diff': {
+ isOpen: true,
+ activeView: 'changed',
+ hasUserSelectedView: true,
+ },
+ },
+ statusBySession: {
+ ...state.statusBySession,
+ 'session-wide-diff': {
+ state: 'ok',
+ workDir: '/repo',
+ repoName: 'repo',
+ branch: 'main',
+ isGitRepo: true,
+ changedFiles: [],
+ },
+ },
+ previewTabsBySession: {
+ ...state.previewTabsBySession,
+ 'session-wide-diff': [{
+ id: 'diff:wide.ts',
+ path: 'wide.ts',
+ kind: 'diff',
+ title: 'wide.ts',
+ diff: longDiffLine,
+ state: 'ok',
+ }],
+ },
+ activePreviewTabIdBySession: {
+ ...state.activePreviewTabIdBySession,
+ 'session-wide-diff': 'diff:wide.ts',
+ },
+ }))
+
+ const view = await renderPanel('session-wide-diff')
+ const diffSurface = view.getByTestId('workspace-code')
+ const firstRow = diffSurface.querySelector('div')
+
+ expect(firstRow?.className).toContain('w-max')
+ expect(firstRow?.className).toContain('min-w-full')
+ expect(firstRow?.className).toContain('grid-cols-[48px_18px_max-content]')
+ expect(diffSurface.textContent).toContain(longDiffLine)
+ })
+
it('can expand long file previews beyond the default rendered line cap', async () => {
const longFile = Array.from({ length: 2300 }, (_, index) => `const line${index + 1} = ${index + 1}`).join('\n')
diff --git a/desktop/src/pages/EmptySession.test.tsx b/desktop/src/pages/EmptySession.test.tsx
index f5462f85..e79f14e2 100644
--- a/desktop/src/pages/EmptySession.test.tsx
+++ b/desktop/src/pages/EmptySession.test.tsx
@@ -194,6 +194,8 @@ describe('EmptySession', () => {
})
expect(screen.getByTestId('model-selector')).toHaveAttribute('data-compact', 'true')
expect(screen.getByRole('button', { name: 'Run' })).toHaveClass('h-11', 'w-11')
+ expect(screen.getByTestId('empty-session-composer-shell')).toHaveClass('px-3')
+ expect(screen.getByTestId('empty-session-composer-panel')).toHaveClass('rounded-2xl')
})
it('creates a session with the selected project and branch when submitted', async () => {
diff --git a/desktop/src/pages/EmptySession.tsx b/desktop/src/pages/EmptySession.tsx
index 91398884..c3079217 100644
--- a/desktop/src/pages/EmptySession.tsx
+++ b/desktop/src/pages/EmptySession.tsx
@@ -541,15 +541,19 @@ export function EmptySession() {
-
+ }`}
+ >
event.preventDefault()}
onDrop={handleDrop}