ui: keep the selected file in state, drop the File: title line

The File: EF.DIR [LF] line doubled as the selection store: pysimFsClickFile
wrote a formatted display string there and pysimFsRead/Save parsed it back
(stripping '✗ ' and ' [TYPE]'). The pane now keeps the name in
pysimFsSelected, the redundant title is gone (FID/type/size/FCI remain in
the info block), and the dead pysimFsSelect() plus the unused 'File:' RU
entry are removed. Read/Save still re-select on the server first: pySim's
current selection is a shared cursor that tree expansion, scans and
commands move, so it cannot identify the file shown in the pane.

SW cache v121 -> v122; structural test updated.
This commit is contained in:
2026-09-12 22:12:25 +03:00
parent e0e86e31af
commit 2a559371ae
3 changed files with 13 additions and 24 deletions
+7 -3
View File
@@ -69,11 +69,15 @@ test('file manager has a probe-all-files button and status line', () => {
assert.ok(html.includes('id="pysim-fs-probe-status"'));
});
test('file manager shows decoded FCI info under the file name', () => {
const name = html.indexOf('id="pysim-fs-filename"');
test('file manager shows FCI info and keeps the selection in state, not the DOM', () => {
const detail = html.indexOf('id="pysim-fs-detail"');
const info = html.indexOf('id="pysim-fs-info"');
const content = html.indexOf('id="pysim-fs-content"');
assert.ok(name !== -1 && info > name && info < content, 'pysim-fs-info must sit between filename and content');
assert.ok(detail !== -1 && info > detail && info < content, 'pysim-fs-info must sit above the content');
assert.ok(html.includes('function pysimFsInfoHtml'));
assert.ok(html.includes("pysimFsInfoHtml(sel)"));
assert.ok(!html.includes('pysim-fs-filename'));
assert.ok(html.includes('let pysimFsSelected = null;'));
assert.ok(html.includes('pysimFsSelected = name;'));
assert.ok(!html.includes('pysimFsSelect()'));
});