Spaces:
Running
Running
solidprivacy-nl commited on
Commit ·
6bf359f
1
Parent(s): ce7721d
Record WP13 TXT reinsert UI implementation
Browse files- CHANGELOG.md +92 -75
CHANGELOG.md
CHANGED
|
@@ -26,6 +26,97 @@ For UI/UX-only work, prefer pure helper modules and tests before touching Stream
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## WP12B — v13.6 Two-mode UI app verification closeout
|
| 30 |
|
| 31 |
Status: completed and app-verified after Actions/sync verification.
|
|
@@ -62,56 +153,6 @@ Latest verified WP12-FIX2 commit:
|
|
| 62 |
268234d9d1aeb9c82658c4c30702f51cfdd58c96
|
| 63 |
```
|
| 64 |
|
| 65 |
-
App verification confirmed:
|
| 66 |
-
|
| 67 |
-
- The app starts without Script execution error.
|
| 68 |
-
- No `IndentationError` appears.
|
| 69 |
-
- `Anonimiseren` mode remains available.
|
| 70 |
-
- `Originele waarden terugzetten` mode remains available and selectable.
|
| 71 |
-
- `Originele waarden terugzetten` now focuses on Scrub Key load + local pasted-text reinsert.
|
| 72 |
-
- The full anonymization workflow is no longer shown as the main content inside the reinsert mode.
|
| 73 |
-
- Existing anonymization workflow remains available in `Anonimiseren`.
|
| 74 |
-
- Existing Scrub Key export/import remains available.
|
| 75 |
-
- Existing pasted-text reinsert remains available.
|
| 76 |
-
- `Scrub Key laden` is visible.
|
| 77 |
-
- Scrub Key upload/paste is visible.
|
| 78 |
-
- `Valideer en laad Scrub Key` is visible.
|
| 79 |
-
- Local pasted-text reinsert section is visible.
|
| 80 |
-
- Warning about restored sensitive/confidential values is visible.
|
| 81 |
-
- Local-only / no-AI / no-cloud text is visible.
|
| 82 |
-
- Text field for reinsert is visible.
|
| 83 |
-
- Button `Zet originele waarden lokaal terug` is visible.
|
| 84 |
-
|
| 85 |
-
Files added or changed:
|
| 86 |
-
|
| 87 |
-
- Changed `WORKPACKAGES.md`.
|
| 88 |
-
- Changed `CHANGELOG.md`.
|
| 89 |
-
- Added `handover/workpackages/20260608_0000_v13_6_two_mode_ui_app_closeout.md`.
|
| 90 |
-
|
| 91 |
-
Tests:
|
| 92 |
-
|
| 93 |
-
- No new tests were added because WP12B is closeout-only.
|
| 94 |
-
- Existing validation is based on coordinator evidence:
|
| 95 |
-
- GitHub Actions green;
|
| 96 |
-
- GitHub to Hugging Face sync green;
|
| 97 |
-
- app verification confirmed.
|
| 98 |
-
|
| 99 |
-
Intentionally not changed:
|
| 100 |
-
|
| 101 |
-
- No code files were changed in WP12B.
|
| 102 |
-
- `fix_streamlit_nested_expanders.py` was not changed in WP12B.
|
| 103 |
-
- `presidio_streamlit.py` was not changed.
|
| 104 |
-
- No test files were changed.
|
| 105 |
-
- No TXT upload reinsert UI added.
|
| 106 |
-
- No DOCX upload reinsert UI added.
|
| 107 |
-
- No PDF reinsert added.
|
| 108 |
-
- No AI calls added.
|
| 109 |
-
- No cloud processing added.
|
| 110 |
-
- No automatic document rehydration added.
|
| 111 |
-
- No existing TXT, CSV, DOCX or PDF scrubbed export/download behavior intentionally changed.
|
| 112 |
-
- No Scrub Key JSON export/import behavior intentionally changed.
|
| 113 |
-
- No Scrub Key storage, secrets, tokens or real personal data added.
|
| 114 |
-
|
| 115 |
Outcome:
|
| 116 |
|
| 117 |
- v13.6 two-mode UI is closed as completed and app-verified.
|
|
@@ -123,23 +164,6 @@ Outcome:
|
|
| 123 |
|
| 124 |
Status: completed and app-verified through WP12B closeout.
|
| 125 |
|
| 126 |
-
Purpose:
|
| 127 |
-
|
| 128 |
-
- Fix the blocking Hugging Face runtime failure introduced by WP12-FIX.
|
| 129 |
-
- Restore app startup.
|
| 130 |
-
- Preserve the two-mode behavior:
|
| 131 |
-
- `Anonimiseren`;
|
| 132 |
-
- `Originele waarden terugzetten`.
|
| 133 |
-
|
| 134 |
-
Blocking runtime error fixed:
|
| 135 |
-
|
| 136 |
-
```text
|
| 137 |
-
File "/home/user/app/presidio_streamlit.py", line 380
|
| 138 |
-
st.markdown("**Scrub Key laden**")
|
| 139 |
-
^
|
| 140 |
-
IndentationError: unexpected indent
|
| 141 |
-
```
|
| 142 |
-
|
| 143 |
Outcome:
|
| 144 |
|
| 145 |
- Generated indentation around `Scrub Key laden` and the local reinsert UI block was corrected.
|
|
@@ -152,13 +176,6 @@ Outcome:
|
|
| 152 |
|
| 153 |
Status: completed through WP12B closeout after WP12-FIX2 runtime hotfix.
|
| 154 |
|
| 155 |
-
Purpose:
|
| 156 |
-
|
| 157 |
-
- Fix the WP12 app-verification issue where mode navigation existed but content was not separated enough.
|
| 158 |
-
- Ensure `Originele waarden terugzetten` does not show the full anonymization/review/export workflow above the reinsert flow.
|
| 159 |
-
- Keep `Anonimiseren` focused on the existing anonymization workflow.
|
| 160 |
-
- Keep `Originele waarden terugzetten` focused on Scrub Key load + local pasted-text reinsert.
|
| 161 |
-
|
| 162 |
Outcome:
|
| 163 |
|
| 164 |
- WP12-FIX separated the intended content paths conceptually.
|
|
@@ -264,7 +281,7 @@ Outcome:
|
|
| 264 |
|
| 265 |
Possible directions:
|
| 266 |
|
| 267 |
-
- WP13
|
| 268 |
- WP14 — v13.8 DOCX reinsert upload/download UI.
|
| 269 |
- PDF text extraction research only after separate reliability review.
|
| 270 |
- Further recognizer expansion by legal domain.
|
|
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
+
## WP13 — v13.7 TXT reinsert upload/download UI
|
| 30 |
+
|
| 31 |
+
Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification.
|
| 32 |
+
|
| 33 |
+
Purpose:
|
| 34 |
+
|
| 35 |
+
- Add controlled TXT upload/download support inside `Originele waarden terugzetten`.
|
| 36 |
+
- Keep the existing pasted-text reinsert flow available as fallback.
|
| 37 |
+
- Reuse the existing deterministic local TXT helper.
|
| 38 |
+
- Keep DOCX upload reinsert UI, PDF reinsert, AI and cloud behavior out of scope.
|
| 39 |
+
|
| 40 |
+
Files added or changed:
|
| 41 |
+
|
| 42 |
+
- Changed `fix_streamlit_nested_expanders.py`.
|
| 43 |
+
- Changed `tests/test_two_mode_ui_patch.py`.
|
| 44 |
+
- Changed `WORKPACKAGES.md`.
|
| 45 |
+
- Changed `CHANGELOG.md`.
|
| 46 |
+
- Added `tests/test_txt_reinsert_ui_patch.py`.
|
| 47 |
+
- Added `handover/workpackages/20260608_0000_v13_7_txt_reinsert_upload_download_ui.md`.
|
| 48 |
+
|
| 49 |
+
Main change:
|
| 50 |
+
|
| 51 |
+
- Added section `TXT-bestand terugzetten` inside the `Originele waarden terugzetten` mode.
|
| 52 |
+
- Added TXT upload label `Upload een TXT-bestand met placeholders`.
|
| 53 |
+
- Added action button `Zet TXT-bestand lokaal terug`.
|
| 54 |
+
- Added output label `Herstelde TXT-tekst`.
|
| 55 |
+
- Added download label `Download hersteld TXT-bestand (.txt)`.
|
| 56 |
+
- The UI calls:
|
| 57 |
+
- `reinsert_txt_bytes(content, scrub_key, encoding="utf-8")`.
|
| 58 |
+
- TXT reinsert requires a loaded Scrub Key before running.
|
| 59 |
+
- The restored TXT result shows text output and an audit summary.
|
| 60 |
+
- The existing pasted-text reinsert flow remains available.
|
| 61 |
+
- The existing anonymization workflow remains in `Anonimiseren`.
|
| 62 |
+
|
| 63 |
+
Safety/warnings:
|
| 64 |
+
|
| 65 |
+
- The TXT reinsert UI warns that restored output may contain personal/confidential data again.
|
| 66 |
+
- The UI states that reinsert is local-only and uses no AI/cloud processing.
|
| 67 |
+
- The Scrub Key warning remains present and keeps the pseudonymization/reversibility context.
|
| 68 |
+
|
| 69 |
+
Tests added/updated:
|
| 70 |
+
|
| 71 |
+
- Added `tests/test_txt_reinsert_ui_patch.py`.
|
| 72 |
+
- Updated `tests/test_two_mode_ui_patch.py`.
|
| 73 |
+
|
| 74 |
+
The tests check:
|
| 75 |
+
|
| 76 |
+
- `reinsert_txt_bytes` is imported and used;
|
| 77 |
+
- TXT UI labels are present;
|
| 78 |
+
- TXT upload accepts `.txt` only;
|
| 79 |
+
- TXT reinsert requires a loaded Scrub Key;
|
| 80 |
+
- TXT reinsert is injected only in the `Originele waarden terugzetten` mode;
|
| 81 |
+
- pasted-text reinsert labels remain present;
|
| 82 |
+
- `Scrub Key laden` remains present;
|
| 83 |
+
- `Anonimiseren` remains present;
|
| 84 |
+
- existing anonymization/export markers remain present;
|
| 85 |
+
- existing Scrub Key export remains present;
|
| 86 |
+
- no DOCX upload reinsert UI is added;
|
| 87 |
+
- no PDF reinsert is added;
|
| 88 |
+
- no AI/cloud behavior is added;
|
| 89 |
+
- `apply_replacements_to_text` is not altered;
|
| 90 |
+
- existing scrubbed download markers are not rewired.
|
| 91 |
+
|
| 92 |
+
Validation:
|
| 93 |
+
|
| 94 |
+
- Local clone/test run could not be performed in the container because outbound GitHub DNS was unavailable:
|
| 95 |
+
- `Could not resolve host: github.com`.
|
| 96 |
+
- GitHub Actions: awaiting verification for WP13 commits.
|
| 97 |
+
- Hugging Face sync: awaiting verification for WP13 commits.
|
| 98 |
+
- App verification: required because UI behavior changed.
|
| 99 |
+
|
| 100 |
+
Intentionally not changed:
|
| 101 |
+
|
| 102 |
+
- `presidio_streamlit.py` was not directly edited.
|
| 103 |
+
- No DOCX upload reinsert UI added.
|
| 104 |
+
- No PDF reinsert added.
|
| 105 |
+
- No AI calls added.
|
| 106 |
+
- No cloud processing added.
|
| 107 |
+
- No automatic document rehydration beyond TXT local reinsert added.
|
| 108 |
+
- No existing TXT, CSV, DOCX or PDF scrubbed export/download behavior intentionally changed.
|
| 109 |
+
- No Scrub Key JSON export behavior intentionally changed.
|
| 110 |
+
- No Scrub Key import/reload behavior intentionally changed except reusing the loaded key for TXT reinsert.
|
| 111 |
+
- No Scrub Key storage, secrets, tokens or real personal data added.
|
| 112 |
+
|
| 113 |
+
Outcome:
|
| 114 |
+
|
| 115 |
+
- WP13 is implemented and awaits GitHub Actions, Hugging Face sync and app verification.
|
| 116 |
+
- Next recommended workpackage is `WP13-CLOSEOUT — v13.7 TXT reinsert upload/download UI app verification closeout`.
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
## WP12B — v13.6 Two-mode UI app verification closeout
|
| 121 |
|
| 122 |
Status: completed and app-verified after Actions/sync verification.
|
|
|
|
| 153 |
268234d9d1aeb9c82658c4c30702f51cfdd58c96
|
| 154 |
```
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
Outcome:
|
| 157 |
|
| 158 |
- v13.6 two-mode UI is closed as completed and app-verified.
|
|
|
|
| 164 |
|
| 165 |
Status: completed and app-verified through WP12B closeout.
|
| 166 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
Outcome:
|
| 168 |
|
| 169 |
- Generated indentation around `Scrub Key laden` and the local reinsert UI block was corrected.
|
|
|
|
| 176 |
|
| 177 |
Status: completed through WP12B closeout after WP12-FIX2 runtime hotfix.
|
| 178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
Outcome:
|
| 180 |
|
| 181 |
- WP12-FIX separated the intended content paths conceptually.
|
|
|
|
| 281 |
|
| 282 |
Possible directions:
|
| 283 |
|
| 284 |
+
- WP13-CLOSEOUT app verification closeout.
|
| 285 |
- WP14 — v13.8 DOCX reinsert upload/download UI.
|
| 286 |
- PDF text extraction research only after separate reliability review.
|
| 287 |
- Further recognizer expansion by legal domain.
|