web: keep mobile composition stable across keyboard and Back navigation
This commit is contained in:
@@ -2,6 +2,7 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -44,6 +45,13 @@ func TestChatBrowserLifecycleAndModelDialog(t *testing.T) {
|
||||
fake := scriptedChat()
|
||||
fake.block = true
|
||||
fake.sessions = []protocol.ChatSession{session}
|
||||
for i := 0; i < 30; i++ {
|
||||
other := protocol.ChatSession{ID: fmt.Sprintf("ses_browser_%d", i), Title: fmt.Sprintf("Scratch chat %d", i), Directory: directory}
|
||||
if err := store.RecordOperatorSession(ctx, other.ID, directory, other.Title, protocol.ChatSessionTagOperator); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fake.sessions = append(fake.sessions, other)
|
||||
}
|
||||
fake.models = []protocol.ChatModel{{ID: "model-a", Provider: "fixture", Name: "Model Alpha"}, {ID: "model-b", Provider: "fixture", Name: "Model Beta"}}
|
||||
fake.messages = []protocol.ChatMessage{
|
||||
{ID: "msg_user", Role: protocol.ChatRoleUser, Parts: []protocol.ChatPart{{Type: "text", Text: "Scratch prompt"}}},
|
||||
|
||||
Reference in New Issue
Block a user