solidprivacy-nl commited on
Commit
443d6af
·
1 Parent(s): 6bf359f

Add handover for v13.7 TXT reinsert UI

Browse files
handover/workpackages/20260608_0000_v13_7_txt_reinsert_upload_download_ui.md ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Handover — WP13 — v13.7 TXT reinsert upload/download UI
2
+
3
+ Repository: `solidprivacy-nl/scrub`
4
+ Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification
5
+
6
+ ## Summary
7
+
8
+ WP13 adds controlled TXT upload/download support inside the existing `Originele waarden terugzetten` mode.
9
+
10
+ The user can now:
11
+
12
+ 1. load or paste a Scrub Key;
13
+ 2. upload a `.txt` file containing placeholders;
14
+ 3. locally reinsert original values using the loaded Scrub Key;
15
+ 4. view restored TXT text;
16
+ 5. view an audit summary;
17
+ 6. download the restored TXT file.
18
+
19
+ The existing pasted-text reinsert flow remains available as fallback.
20
+
21
+ ## Files added
22
+
23
+ - `tests/test_txt_reinsert_ui_patch.py`
24
+ - `handover/workpackages/20260608_0000_v13_7_txt_reinsert_upload_download_ui.md`
25
+
26
+ ## Files changed
27
+
28
+ - `fix_streamlit_nested_expanders.py`
29
+ - `tests/test_two_mode_ui_patch.py`
30
+ - `WORKPACKAGES.md`
31
+ - `CHANGELOG.md`
32
+
33
+ ## Tests
34
+
35
+ Added:
36
+
37
+ ```text
38
+ tests/test_txt_reinsert_ui_patch.py
39
+ ```
40
+
41
+ Updated:
42
+
43
+ ```text
44
+ tests/test_two_mode_ui_patch.py
45
+ ```
46
+
47
+ The tests check:
48
+
49
+ - `reinsert_txt_bytes` is imported and used;
50
+ - `TXT-bestand terugzetten` appears;
51
+ - `Upload een TXT-bestand met placeholders` appears;
52
+ - `Zet TXT-bestand lokaal terug` appears;
53
+ - `Herstelde TXT-tekst` appears;
54
+ - `Download hersteld TXT-bestand (.txt)` appears;
55
+ - TXT upload accepts `.txt` only;
56
+ - TXT reinsert requires a loaded Scrub Key;
57
+ - TXT reinsert is injected only in the `Originele waarden terugzetten` mode;
58
+ - pasted-text reinsert remains available;
59
+ - Scrub Key load/import remains available;
60
+ - anonymization/export markers remain present;
61
+ - Scrub Key export remains present;
62
+ - no DOCX upload reinsert UI is added;
63
+ - no PDF reinsert is added;
64
+ - no AI/cloud behavior is added;
65
+ - `apply_replacements_to_text` is not altered;
66
+ - existing scrubbed download markers are not rewired.
67
+
68
+ ## Validation status
69
+
70
+ Local clone/test run could not be performed in the container because outbound GitHub DNS was unavailable:
71
+
72
+ ```text
73
+ Could not resolve host: github.com
74
+ ```
75
+
76
+ No local passing test result is claimed.
77
+
78
+ ## GitHub Actions status
79
+
80
+ Awaiting verification for WP13 commits.
81
+
82
+ ## Hugging Face sync status
83
+
84
+ Awaiting verification for WP13 commits.
85
+
86
+ ## App verification status
87
+
88
+ Required because UI behavior changed. Pending coordinator/user verification.
89
+
90
+ App verification should confirm:
91
+
92
+ ### In `Anonimiseren`
93
+
94
+ - anonymization workflow remains available;
95
+ - source text/file input remains visible;
96
+ - review table remains visible;
97
+ - scrubbed TXT/CSV/DOCX/PDF downloads remain available;
98
+ - Scrub Key JSON export remains available;
99
+ - TXT reinsert upload UI is not presented as part of the anonymization workflow.
100
+
101
+ ### In `Originele waarden terugzetten`
102
+
103
+ - `Scrub Key laden` remains visible;
104
+ - Scrub Key upload/paste validation remains visible;
105
+ - pasted-text reinsert remains visible;
106
+ - `TXT-bestand terugzetten` is visible;
107
+ - TXT upload accepts `.txt`;
108
+ - `Zet TXT-bestand lokaal terug` works with a valid Scrub Key;
109
+ - restored TXT text appears;
110
+ - `Download hersteld TXT-bestand (.txt)` works;
111
+ - audit summary appears;
112
+ - warning about restored sensitive/confidential data is visible;
113
+ - local-only / no-AI / no-cloud text is visible.
114
+
115
+ Also confirm:
116
+
117
+ - no DOCX upload reinsert UI appears yet;
118
+ - no PDF reinsert appears;
119
+ - no AI/cloud behavior appears;
120
+ - existing Scrub Key export/import remains available.
121
+
122
+ ## Boundaries preserved
123
+
124
+ - `presidio_streamlit.py` was not directly edited.
125
+ - No DOCX upload reinsert UI added.
126
+ - No PDF reinsert added.
127
+ - No AI calls added.
128
+ - No cloud processing added.
129
+ - No automatic document rehydration beyond TXT local reinsert added.
130
+ - No existing scrubbed TXT/CSV/DOCX/PDF export/download behavior intentionally changed.
131
+ - No Scrub Key JSON export behavior intentionally changed.
132
+ - No Scrub Key import/reload behavior intentionally changed except reusing the loaded key for TXT reinsert.
133
+ - No Scrub Key storage, secrets, tokens or real personal data added.
134
+
135
+ ## Remaining risks
136
+
137
+ - The UI is still generated by a startup patch, so Hugging Face app verification is essential.
138
+ - TXT decode is UTF-8 based through the existing helper; invalid UTF-8 should produce validation issues.
139
+ - Future DOCX upload reinsert UI must remain a separate WP14 workpackage.
140
+
141
+ ## Next recommended step
142
+
143
+ ```text
144
+ WP13-CLOSEOUT — v13.7 TXT reinsert upload/download UI app verification closeout
145
+ ```
146
+
147
+ Only after WP13 is app-verified should the project continue to:
148
+
149
+ ```text
150
+ WP14 — v13.8 DOCX reinsert upload/download UI
151
+ ```