You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 556c99b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(picker): the whole-drive row is reconciled by path - a drive still listed keeps its button, renamed in place, while drives come and go beside it - so on a Windows machine with C: and D: the C: drawn at once survives the layout's answer, focused or being clicked (G26 review F3.5)
F2.4 kept the buttons only where the answer named exactly the drives the
row held; with C: drawn at once and the layout (Get-Volume, up to 30 s)
answering C: and D:, the whole row was rewritten, a keyboard user on C:
fell to <body> and a click under way was lost. Now a drive that left loses
its button, one that came gets a new one in its place in the letter order,
and the row is written whole only where no button can stand (none kept, or
the kept ones in another order). The fake row in the test supports
remove() and insertAdjacentHTML as a browser does. Mutants f35-a..f RED.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -557,21 +583,60 @@ test('on its first open the picker draws the whole drive at once, under the name
557
583
'asked again, the same answer leaves the same button standing');
558
584
});
559
585
560
-
test('on Windows the home folder\'s own drive is drawn at once, and an answer naming other drives redraws the row with them — never a renamed button that still opens the drive that left (G26 review F2.4)',async()=>{
586
+
/*
587
+
* F2.4 kept a button only where the answer named the same drives as the row
588
+
* held. On a Windows machine with C: and D:, the C: drawn at once was
589
+
* replaced when the layout (Get-Volume, up to 30 s) answered with both: a
590
+
* keyboard user on it fell to <body>, and a click under way was lost (G26
591
+
* review F3.5). The row is reconciled by path: a drive still listed keeps its
592
+
* button, renamed in place; a drive that left loses its button; one that came
593
+
* gets a new one, in its place in the order.
594
+
*/
595
+
test('on Windows the home folder\'s own drive is drawn at once, and the layout\'s answer keeps that button — renamed in place — as drives come and go beside it, each new one in its place in the order and no button left opening a drive that left (G26 review F2.4, F3.5)',async()=>{
'C: keeps its button, renamed in place, with D: put in beside it — the row is not written again, so a choice focused or being clicked keeps its button');
570
610
// D: unplugged and E: plugged in: as many drives as before, not the same ones.
assert.deepEqual(t.drives(),[['Card (B:)','B:\\'],['Windows (C:)','C:\\'],['D:','D:\\'],['Backup (E:)','E:\\']],'each new drive in its place in the letter order');
624
+
assert.deepEqual([t.driveRow.writes,t.driveRow.buttons[1]===c,t.driveRow.buttons[3]===e],[1,true,true],'C: and E: keep their buttons');
625
+
assert.match(t.$('browseDrives').innerHTML,/^<spanclass="browse-drives-lbl">Wholedrive<\/span>/,'and the row is still said as the whole drive');
626
+
});
627
+
628
+
test('the whole-drive row is written again only where no button can stand — drives in another order than the buttons on screen, or none of them kept — and drawn empty and hidden for no drive (G26 review F3.5)',()=>{
assert.deepEqual([t.drives(),label()],[[['C:','C:\\'],['D:','D:\\']],true],'control: drawn, under its label');
634
+
t.rt.drawDrives([drive('D'),drive('C')]);
635
+
assert.deepEqual([t.drives(),label()],[[['D:','D:\\'],['C:','C:\\']],true],'drawn in the order given, though both drives were on screen');
636
+
t.rt.drawDrives([drive('E')]);
637
+
assert.deepEqual([t.drives(),label()],[[['E:','E:\\']],true],'none kept: the new drive alone, under the label');
638
+
t.rt.drawDrives([]);
639
+
assert.deepEqual([t.drives(),t.$('browseDrives').hidden,t.$('browseDrives').innerHTML],[[],true,''],'no drive: an empty row, hidden');
575
640
});
576
641
577
642
test('the whole drive is offered only where the picker scans — not for an Autopilot folder or an offload destination — and a late layout answer never draws it into those (G26)',async()=>{
0 commit comments