Skip to content
Open
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: 8 additions & 0 deletions frontend/src/pages/quick-start/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,14 @@ describe('QuickStartPage', () => {
)
})

it('keeps browser form history out of the creation composer', () => {
renderAt('/quick-start', serviceFor(null))
const composer = screen.getByRole('textbox', { name: '创作指令' })

expect(composer.getAttribute('autocomplete')).toBe('off')
expect(composer.closest('form')?.getAttribute('autocomplete')).toBe('off')
})

it('keeps the entry and run canvases at least viewport height', async () => {
const entry = renderAt('/quick-start', serviceFor(null))
expect(entry.getByLabelText('创作指令').closest('section')?.className).toContain(
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/quick-start/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ function QuickStartInput({
>
<form
onSubmit={(event) => void submit(event)}
autoComplete="off"
data-prompt-state={promptState}
className={`quick-start-agent-composer grid items-center gap-1.5 overflow-hidden rounded-xl border border-app-line-strong bg-app-surface-raised p-1.5 shadow-app-panel transition-shadow focus-within:border-app-accent focus-within:shadow-[var(--shadow-app-composer-focus)] ${
hasConversation ? 'sm:grid-cols-[1fr_auto]' : 'sm:grid-cols-[1fr_auto_auto]'
Expand All @@ -814,6 +815,7 @@ function QuickStartInput({
<input
id="quick-start-prompt"
type="text"
autoComplete="off"
aria-label="创作指令"
value={prompt}
onChange={(event) => setPrompt(event.target.value)}
Expand Down
Loading