Spaces:
Running
Running
Commit ·
bc4a842
1
Parent(s): c41b6e0
Reduce review export vertical density
Browse files- CHANGELOG.md +52 -0
- WORKPACKAGES.md +20 -0
- handover/workpackages/20260705_2213_review_export_vertical_density_implementation.md +59 -0
- presidio_streamlit.py +28 -27
- side_by_side_review_panel_ui.py +2 -6
- workpackage_claims/scrub_wp_review_export_vertical_density_simplification_implementation.md +10 -1
CHANGELOG.md
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
## 2026-07-05 — SCRUB-WP_DUPLICATE_INPUT_SURFACE_SIMPLIFICATION_IMPLEMENTATION
|
| 2 |
|
| 3 |
Status: implemented / local validation passed.
|
|
|
|
| 1 |
+
## 2026-07-05 — SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_IMPLEMENTATION
|
| 2 |
+
|
| 3 |
+
Status: implemented / local validation passed.
|
| 4 |
+
|
| 5 |
+
Purpose:
|
| 6 |
+
|
| 7 |
+
- Reduce vertical density in the Review and Export areas after plan and contract-test packages were merged.
|
| 8 |
+
- Compress repeated Review helper copy while keeping side-by-side review, marker toggle, manual missed-value entry and replacement table accessible.
|
| 9 |
+
- Put the three primary document downloads in a compact three-column layout.
|
| 10 |
+
- Keep Scrub Key, audit/technical files and DOCX hygiene audit separate and accessible.
|
| 11 |
+
|
| 12 |
+
Files changed:
|
| 13 |
+
|
| 14 |
+
- `presidio_streamlit.py`
|
| 15 |
+
- `side_by_side_review_panel_ui.py`
|
| 16 |
+
- `CHANGELOG.md`
|
| 17 |
+
- `WORKPACKAGES.md`
|
| 18 |
+
- `workpackage_claims/scrub_wp_review_export_vertical_density_simplification_implementation.md`
|
| 19 |
+
|
| 20 |
+
Files added:
|
| 21 |
+
|
| 22 |
+
- `handover/workpackages/20260705_2213_review_export_vertical_density_implementation.md`
|
| 23 |
+
|
| 24 |
+
Validation status:
|
| 25 |
+
|
| 26 |
+
- Local validation passed.
|
| 27 |
+
- GitHub Actions pending after PR.
|
| 28 |
+
- Hugging Face sync pending after merge.
|
| 29 |
+
- App verification required after sync because visible UI behavior changed.
|
| 30 |
+
|
| 31 |
+
Intentionally not changed:
|
| 32 |
+
|
| 33 |
+
- recognizer logic;
|
| 34 |
+
- replacement logic;
|
| 35 |
+
- review table semantics;
|
| 36 |
+
- export payloads;
|
| 37 |
+
- download filenames;
|
| 38 |
+
- MIME types;
|
| 39 |
+
- Scrub Key JSON semantics;
|
| 40 |
+
- Scrub Key warning meaning;
|
| 41 |
+
- reinsert behavior;
|
| 42 |
+
- DOCX/PDF parsing;
|
| 43 |
+
- startup/runtime behavior;
|
| 44 |
+
- dependencies;
|
| 45 |
+
- benchmark or recall logic.
|
| 46 |
+
|
| 47 |
+
Next recommended step:
|
| 48 |
+
|
| 49 |
+
- Open PR, verify GitHub Actions, merge when green, verify Hugging Face sync, then request live app verification.
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
## 2026-07-05 — SCRUB-WP_DUPLICATE_INPUT_SURFACE_SIMPLIFICATION_IMPLEMENTATION
|
| 54 |
|
| 55 |
Status: implemented / local validation passed.
|
WORKPACKAGES.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
## 2026-07-05 01:13 Europe/Amsterdam — SCRUB-WP_DUPLICATE_INPUT_SURFACE_SIMPLIFICATION_IMPLEMENTATION
|
| 2 |
|
| 3 |
Status: implemented / local validation passed.
|
|
|
|
| 1 |
+
## 2026-07-05 22:13 Europe/Amsterdam — SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_IMPLEMENTATION
|
| 2 |
+
|
| 3 |
+
Status: implemented / local validation passed.
|
| 4 |
+
|
| 5 |
+
Summary:
|
| 6 |
+
- Implemented the conservative Option B Review/Export density pass.
|
| 7 |
+
- Compressed repeated Review helper copy without hiding the main side-by-side review.
|
| 8 |
+
- Kept manual missed-value entry and the replacement table collapsed and accessible.
|
| 9 |
+
- Changed the primary TXT/DOCX/PDF document downloads from three stacked buttons into a compact three-column layout.
|
| 10 |
+
- Preserved export payloads, filenames, MIME types, Scrub Key JSON, reinsert behavior, recognition behavior and startup/runtime boundaries.
|
| 11 |
+
|
| 12 |
+
Validation:
|
| 13 |
+
- Local validation passed.
|
| 14 |
+
- GitHub Actions pending after PR.
|
| 15 |
+
- Hugging Face sync pending after merge.
|
| 16 |
+
- App verification required because visible UI behavior changed.
|
| 17 |
+
|
| 18 |
+
Next recommended step:
|
| 19 |
+
- `SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_APP_VERIFY`.
|
| 20 |
+
|
| 21 |
## 2026-07-05 01:13 Europe/Amsterdam — SCRUB-WP_DUPLICATE_INPUT_SURFACE_SIMPLIFICATION_IMPLEMENTATION
|
| 22 |
|
| 23 |
Status: implemented / local validation passed.
|
handover/workpackages/20260705_2213_review_export_vertical_density_implementation.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Handover — SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_IMPLEMENTATION
|
| 2 |
+
|
| 3 |
+
Repository worked in: solidprivacy-nl/scrub
|
| 4 |
+
|
| 5 |
+
## Workpackage title
|
| 6 |
+
|
| 7 |
+
SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_IMPLEMENTATION — Reduce Review/Export vertical density
|
| 8 |
+
|
| 9 |
+
## Status
|
| 10 |
+
|
| 11 |
+
Implemented / local validation passed.
|
| 12 |
+
|
| 13 |
+
## Files added
|
| 14 |
+
|
| 15 |
+
- `handover/workpackages/20260705_2213_review_export_vertical_density_implementation.md`
|
| 16 |
+
|
| 17 |
+
## Files changed
|
| 18 |
+
|
| 19 |
+
- `presidio_streamlit.py`
|
| 20 |
+
- `side_by_side_review_panel_ui.py`
|
| 21 |
+
- `CHANGELOG.md`
|
| 22 |
+
- `WORKPACKAGES.md`
|
| 23 |
+
- `workpackage_claims/scrub_wp_review_export_vertical_density_simplification_implementation.md`
|
| 24 |
+
|
| 25 |
+
## Tests
|
| 26 |
+
|
| 27 |
+
Passed locally:
|
| 28 |
+
|
| 29 |
+
- `python -m pytest -q tests/test_review_export_vertical_density_contracts.py` → 9 passed.
|
| 30 |
+
- Related narrow Review/Export guardrail suite → 40 passed.
|
| 31 |
+
- `git diff --check` passed.
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
## Validation status
|
| 35 |
+
|
| 36 |
+
Local validation passed.
|
| 37 |
+
|
| 38 |
+
## GitHub Actions status
|
| 39 |
+
|
| 40 |
+
Pending after PR.
|
| 41 |
+
|
| 42 |
+
## Hugging Face sync status
|
| 43 |
+
|
| 44 |
+
Pending after merge.
|
| 45 |
+
|
| 46 |
+
## App verification status
|
| 47 |
+
|
| 48 |
+
Required after Actions and Hugging Face sync because visible Review/Export UI behavior changed.
|
| 49 |
+
|
| 50 |
+
## Remaining risks
|
| 51 |
+
|
| 52 |
+
- Live app verification must confirm the page is shorter and less form-like.
|
| 53 |
+
- Review safety controls must remain discoverable: side-by-side review, marker toggle, missed-value entry and replacement table.
|
| 54 |
+
- Export semantics must remain unchanged: payloads, filenames and MIME types.
|
| 55 |
+
- Scrub Key and audit files must remain separate from normal document downloads.
|
| 56 |
+
|
| 57 |
+
## Next recommended step
|
| 58 |
+
|
| 59 |
+
Run local validation, open PR, verify GitHub Actions, merge when green, verify Hugging Face sync, then request live app verification.
|
presidio_streamlit.py
CHANGED
|
@@ -673,9 +673,8 @@ try:
|
|
| 673 |
is_expert_review = review_mode == "Expertcontrole"
|
| 674 |
is_basic_review = not is_expert_review
|
| 675 |
|
| 676 |
-
st.caption("Pas alleen aan wat nodig is; detailcontrole staat hieronder ingeklapt.")
|
| 677 |
st.caption(
|
| 678 |
-
"
|
| 679 |
)
|
| 680 |
if is_expert_review:
|
| 681 |
with st.expander("Waarom controleren?", expanded=False):
|
|
@@ -872,7 +871,7 @@ try:
|
|
| 872 |
}
|
| 873 |
)
|
| 874 |
|
| 875 |
-
st.
|
| 876 |
|
| 877 |
export_text = apply_replacements_to_text(st_text, edited_replacements)
|
| 878 |
|
|
@@ -900,18 +899,18 @@ try:
|
|
| 900 |
st.warning("Onthouden vervangingen gewist.")
|
| 901 |
|
| 902 |
st.subheader("3. Exporteer resultaat")
|
| 903 |
-
st.caption(
|
| 904 |
-
"Download de opgeschoonde documenten. Scrub Key en auditbestanden staan in aparte secties."
|
| 905 |
-
)
|
| 906 |
|
| 907 |
st.markdown("**Document downloaden**")
|
| 908 |
-
st.
|
| 909 |
-
|
| 910 |
-
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
|
| 914 |
-
|
|
|
|
|
|
|
| 915 |
|
| 916 |
docx_bytes = None
|
| 917 |
docx_filename = "opgeschoonde_tekst.docx"
|
|
@@ -923,24 +922,26 @@ try:
|
|
| 923 |
docx_bytes = docx_from_text(export_text)
|
| 924 |
docx_filename = "opgeschoonde_tekst.docx"
|
| 925 |
|
| 926 |
-
|
| 927 |
-
|
| 928 |
-
|
| 929 |
-
|
| 930 |
-
|
| 931 |
-
|
| 932 |
-
|
|
|
|
| 933 |
except Exception as docx_error:
|
| 934 |
st.error(f"Kon geen DOCX-export maken: {docx_error}")
|
| 935 |
|
| 936 |
try:
|
| 937 |
-
|
| 938 |
-
|
| 939 |
-
|
| 940 |
-
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
|
|
|
|
| 944 |
except Exception as pdf_error:
|
| 945 |
st.error(f"Kon geen PDF-export maken: {pdf_error}")
|
| 946 |
|
|
|
|
| 673 |
is_expert_review = review_mode == "Expertcontrole"
|
| 674 |
is_basic_review = not is_expert_review
|
| 675 |
|
|
|
|
| 676 |
st.caption(
|
| 677 |
+
"Pas alleen aan wat nodig is; de vervangtabel blijft beschikbaar voor detailcontrole."
|
| 678 |
)
|
| 679 |
if is_expert_review:
|
| 680 |
with st.expander("Waarom controleren?", expanded=False):
|
|
|
|
| 871 |
}
|
| 872 |
)
|
| 873 |
|
| 874 |
+
st.caption(f"{len(edited_replacements)} vervanging(en) worden toegepast op de exports.")
|
| 875 |
|
| 876 |
export_text = apply_replacements_to_text(st_text, edited_replacements)
|
| 877 |
|
|
|
|
| 899 |
st.warning("Onthouden vervangingen gewist.")
|
| 900 |
|
| 901 |
st.subheader("3. Exporteer resultaat")
|
| 902 |
+
st.caption("Download documenten; Scrub Key en auditbestanden blijven apart.")
|
|
|
|
|
|
|
| 903 |
|
| 904 |
st.markdown("**Document downloaden**")
|
| 905 |
+
download_txt_col, download_docx_col, download_pdf_col = st.columns(3)
|
| 906 |
+
with download_txt_col:
|
| 907 |
+
st.download_button(
|
| 908 |
+
label="Download opgeschoonde tekst (.txt)",
|
| 909 |
+
data=export_text.encode("utf-8"),
|
| 910 |
+
file_name="opgeschoonde_tekst.txt",
|
| 911 |
+
mime="text/plain",
|
| 912 |
+
key="download_txt",
|
| 913 |
+
)
|
| 914 |
|
| 915 |
docx_bytes = None
|
| 916 |
docx_filename = "opgeschoonde_tekst.docx"
|
|
|
|
| 922 |
docx_bytes = docx_from_text(export_text)
|
| 923 |
docx_filename = "opgeschoonde_tekst.docx"
|
| 924 |
|
| 925 |
+
with download_docx_col:
|
| 926 |
+
st.download_button(
|
| 927 |
+
label="Download opgeschoond Word-bestand (.docx)",
|
| 928 |
+
data=docx_bytes,
|
| 929 |
+
file_name=docx_filename,
|
| 930 |
+
mime="application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
| 931 |
+
key="download_docx",
|
| 932 |
+
)
|
| 933 |
except Exception as docx_error:
|
| 934 |
st.error(f"Kon geen DOCX-export maken: {docx_error}")
|
| 935 |
|
| 936 |
try:
|
| 937 |
+
with download_pdf_col:
|
| 938 |
+
st.download_button(
|
| 939 |
+
label="Download opgeschoonde PDF (.pdf)",
|
| 940 |
+
data=pdf_from_text(export_text),
|
| 941 |
+
file_name="opgeschoonde_tekst.pdf",
|
| 942 |
+
mime="application/pdf",
|
| 943 |
+
key="download_pdf",
|
| 944 |
+
)
|
| 945 |
except Exception as pdf_error:
|
| 946 |
st.error(f"Kon geen PDF-export maken: {pdf_error}")
|
| 947 |
|
side_by_side_review_panel_ui.py
CHANGED
|
@@ -243,15 +243,11 @@ def render_side_by_side_review_panel(*, source_text: str, edited_replacements_df
|
|
| 243 |
)
|
| 244 |
|
| 245 |
st.caption(
|
| 246 |
-
"Twijfel je over een waarde? Open
|
| 247 |
"Deze vergelijking wijzigt zelf niets."
|
| 248 |
)
|
| 249 |
-
st.caption(model["review_table"]["copy"])
|
| 250 |
st.markdown("#### Meer controleopties")
|
| 251 |
-
st.caption(
|
| 252 |
-
"Aanvullen, detailcontrole en stap-voor-stap controle staan hieronder compact bij elkaar. "
|
| 253 |
-
"Alles staat standaard ingeklapt."
|
| 254 |
-
)
|
| 255 |
|
| 256 |
return {
|
| 257 |
"report_only": True,
|
|
|
|
| 243 |
)
|
| 244 |
|
| 245 |
st.caption(
|
| 246 |
+
"Twijfel je over een waarde? Open Meer controleopties. "
|
| 247 |
"Deze vergelijking wijzigt zelf niets."
|
| 248 |
)
|
|
|
|
| 249 |
st.markdown("#### Meer controleopties")
|
| 250 |
+
st.caption("Aanvullen en detailcontrole staan hieronder ingeklapt.")
|
|
|
|
|
|
|
|
|
|
| 251 |
|
| 252 |
return {
|
| 253 |
"report_only": True,
|
workpackage_claims/scrub_wp_review_export_vertical_density_simplification_implementation.md
CHANGED
|
@@ -4,7 +4,7 @@ Repository: solidprivacy-nl/scrub
|
|
| 4 |
|
| 5 |
Workpackage title: SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_IMPLEMENTATION
|
| 6 |
|
| 7 |
-
Status:
|
| 8 |
|
| 9 |
Claimed by: market-predictions via ChatGPT web worker
|
| 10 |
|
|
@@ -27,3 +27,12 @@ Boundaries:
|
|
| 27 |
- no reinsert behavior changes;
|
| 28 |
- no startup/runtime patches;
|
| 29 |
- no dependency changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
Workpackage title: SCRUB-WP_REVIEW_EXPORT_VERTICAL_DENSITY_SIMPLIFICATION_IMPLEMENTATION
|
| 6 |
|
| 7 |
+
Status: completed / ready for app verification
|
| 8 |
|
| 9 |
Claimed by: market-predictions via ChatGPT web worker
|
| 10 |
|
|
|
|
| 27 |
- no reinsert behavior changes;
|
| 28 |
- no startup/runtime patches;
|
| 29 |
- no dependency changes.
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
Implemented at: 2026-07-05 22:13 Europe/Amsterdam
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
Local validation passed:
|
| 36 |
+
- Targeted review/export density contracts: 9 passed.
|
| 37 |
+
- Related narrow Review/Export guardrail tests: 40 passed.
|
| 38 |
+
- git diff --check passed.
|