Skip to content

Commit 41f3d5d

Browse files
feat: add console layer and ownership import wizards (#367)
Staged TUI slices 1-3 from the 2026-07-06 spec: - New internal Private/ShareSurfer.Console.ps1: choice/text/boolean/ multi-select state machines, capability detection (with SHARESURFER_PLAIN_CONSOLE override), render-to-string screens with a single output sink, return-based cancellation (Action 'Cancelled'), zero-character key filtering, and compatibility shims for the #364 prompt names. - Ownership header interview is now a guided wizard: step counter, suggested header, numbered header list with /text filtering and free-typed entry, per-field explanations, and a return shape that carries interview warnings into the mapping profile (P5-E). - Source classification uses the console layer with return-based cancel; Join and mapping-profile entry points decide what cancel means and keep the existing operator-cancel messages. - Cancelled interviews write no partial mapping profile output. - Docs updated to describe the wizard screens and controls. Suite: 126/126 (6 new tests: key translation, multi-select, text prompt, wizard render/filter, classification cancel, profile warnings + cancel). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 87908fb commit 41f3d5d

6 files changed

Lines changed: 1392 additions & 341 deletions

docs/admin-ownership-import.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ New-ShareSurferOwnershipMappingProfile `
192192
-Force
193193
```
194194

195-
During interactive mode, ShareSurfer keeps a controls line on screen:
195+
During interactive mode, ShareSurfer walks one guided screen per field. Each screen shows the step counter, the suggested header when there is one, the source CSV's headers as a numbered list, a short explanation of why the field matters, and this controls line:
196196

197197
```text
198-
Enter=accept/select | S=skip | B=back | ?=help | Q=quit
198+
Enter=accept | numbers=choose | type a header name | /text=filter | S=skip | B=back | ?=help | Q=quit
199199
```
200200

201-
Press Enter to accept a suggested header, type another header name when you know it, press `S` to deliberately leave that ShareSurfer field blank, or press `B` to go back and fix the previous field. If there is no confident suggestion and the source has fewer than 10 headers, pressing Enter opens a small selector so you can choose the right header with arrow keys where the console supports them, or by number in simpler hosts.
201+
Press Enter to accept the suggested header (or to move on when there is no suggestion), type a header's number or its name to map it, type `/` followed by text to narrow a long header list (for example `/mail`), press `S` to deliberately leave that ShareSurfer field blank, press `B` to go back and fix the previous field, or press `Q` to cancel without writing any files. If you type a header name that is not in the CSV, ShareSurfer says so on screen and records it as a warning in the saved mapping profile so it can be reviewed later.
202202

203203
## Step 3: Import A Normalized Ownership CSV
204204

docs/ownership-csv-ingest-quick-reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ New-ShareSurferOwnershipMappingProfile `
6969
-Force
7070
```
7171

72-
During interactive mode, ShareSurfer asks which source CSV header should map to each ShareSurfer field and keeps this controls line visible:
72+
During interactive mode, ShareSurfer walks one guided screen per field, showing the step counter, the suggestion, the CSV's headers as a numbered list, and why the field matters, with this controls line visible:
7373

7474
```text
75-
Enter=accept/select | S=skip | B=back | ?=help | Q=quit
75+
Enter=accept | numbers=choose | type a header name | /text=filter | S=skip | B=back | ?=help | Q=quit
7676
```
7777

78-
Press Enter to accept a suggestion, type a different header when you already know it, press `S` to intentionally leave a field blank, or press `B` to go back and fix the previous field. If ShareSurfer does not have a suggestion and the CSV has fewer than 10 headers, pressing Enter opens a small selector. Arrow keys work in normal consoles; numbered selection is used as the fallback.
78+
Press Enter to accept a suggestion, type a header's number or name to map it, type `/text` to filter a long header list, press `S` to intentionally leave a field blank, press `B` to go back and fix the previous field, or press `Q` to cancel without writing any files. A typed header that is not in the CSV is called out on screen and recorded as a warning in the saved mapping profile.
7979

8080
## 5. Normalize The CSV
8181

0 commit comments

Comments
 (0)