fix: name the allowed-paths action for what it adds, a path or a file

"Add folder or path" promised one thing and offered another: the listing is
folders only, because the Host's browse primitive has no file rows, while the
extras legitimately name files — `../../CONTROLLER.md` is the example the panel
itself gives.

The action is "Add path or file", its field is "Path or file", and the hint says
which of the two the list can show and how the other one is added. Nothing about
the interaction moved; the copy was the part that was wrong.
This commit is contained in:
NotExpectedYet committed 2026-09-27 07:31:50 +01:00
1 parent 6b92656ed2
commit b0902017fd
3 files changed
+54 -7

No files matched your search

+13 -4
View File
@@ -680,7 +680,7 @@ window.__ModuleLoader__.load({
return h(Modal, {
open: true,
onClose,
title: target === 'focus' ? 'Choose the focus folder' : 'Add a folder or a path',
title: target === 'focus' ? 'Choose the focus folder' : 'Add a path or a file',
closeLabel: 'Close',
className: PICKER_CLASS,
// One scroll region around everything but the footer, so the card is
@@ -694,7 +694,7 @@ window.__ModuleLoader__.load({
h(
'div',
{ key: 'path' },
h('label', { style: labelStyle, htmlFor: 'facet-picker-path' }, target === 'focus' ? 'Folder' : 'Path'),
h('label', { style: labelStyle, htmlFor: 'facet-picker-path' }, target === 'focus' ? 'Folder' : 'Path or file'),
h('input', {
id: 'facet-picker-path',
type: 'text',
@@ -713,7 +713,16 @@ window.__ModuleLoader__.load({
model.open(typed)
},
}),
h('p', { style: hintStyle }, 'Relative to the session folder, or absolute. Enter lists whatever is there.'),
h(
'p',
{ style: hintStyle },
target === 'focus'
? 'Relative to the session folder, or absolute. Enter lists whatever is there.'
: // The list holds folders only — the Host's browse primitive has no
// file rows — so the box is where a file is named, and saying so
// is the difference between a dead end and an instruction.
'Relative to the session folder, or absolute. The list holds folders; type a file\u2019s name to add the file itself.',
),
),
h(
'div',
@@ -1015,7 +1024,7 @@ window.__ModuleLoader__.load({
h(
'button',
{ type: 'button', style: quietButtonStyle, disabled: !canBrowse, onClick: () => openPicker('extra') },
'+ Add folder or path\u2026',
'+ Add path or file\u2026',
),
),
h(