The cluster and node pages swap their live part every few seconds, and the forms inside it went with it: what was typed, an open choice, the focus. Filling one in raced the clock. The swap now waits while a field in the live part has the focus or a form in it has been typed into and not sent; sending it, or leaving the page, ends that. The mirror page's reload during a download goes through the same check instead of http-equiv. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
45666e72db
commit
e78075876b
5 files changed
+57
-10
No files matched your search
@@ -239,14 +239,14 @@ func TestThePageReloadsOnlyWhileSomethingIsDownloading(t *testing.T) {
|
||||
|
||||
// A reload while nothing is happening would take with it whatever the
|
||||
// operator was typing into the fetch form.
|
||||
if strings.Contains(idle, "http-equiv=\"refresh\"") {
|
||||
if strings.Contains(idle, "name=\"llmgw-refresh\"") {
|
||||
t.Error("an idle page should not reload itself")
|
||||
}
|
||||
|
||||
busy := mirrorGet(t, mirrorPage(t, &fakeMirror{models: []mirror.Status{
|
||||
{Model: "m", Version: "v", File: "f", State: mirror.Fetching},
|
||||
}}, true), "/admin/mirror").Body.String()
|
||||
if !strings.Contains(busy, "http-equiv=\"refresh\"") {
|
||||
if !strings.Contains(busy, "name=\"llmgw-refresh\"") {
|
||||
t.Error("a page with a download running should follow it")
|
||||
}
|
||||
}
|
||||
@@ -680,7 +680,7 @@ func TestEachTabDoesOnlyItsOwnWork(t *testing.T) {
|
||||
if strings.Contains(held, `name="source" required`) || strings.Contains(held, "Search Hugging Face") {
|
||||
t.Error("other tabs' forms are on the list")
|
||||
}
|
||||
if !strings.Contains(held, `http-equiv="refresh"`) {
|
||||
if !strings.Contains(held, `name="llmgw-refresh"`) {
|
||||
t.Error("the list stopped following a download")
|
||||
}
|
||||
|
||||
@@ -688,7 +688,7 @@ func TestEachTabDoesOnlyItsOwnWork(t *testing.T) {
|
||||
if reg.explored != 1 || !strings.Contains(explore, "Search Hugging Face") {
|
||||
t.Error("the explorer tab did not explore")
|
||||
}
|
||||
if strings.Contains(explore, `id="held"`) || strings.Contains(explore, `http-equiv="refresh"`) {
|
||||
if strings.Contains(explore, `id="held"`) || strings.Contains(explore, `name="llmgw-refresh"`) {
|
||||
t.Error("the explorer shows the list, or reloads away a search")
|
||||
}
|
||||
// A link from before there were tabs still lands on the explorer.
|
||||
|
||||
Reference in new issue
Block a user