feat(datagrid): mask sensitive columns in the results grid - #587
feat(datagrid): mask sensitive columns in the results grid#587iamthenuggetman wants to merge 5 commits into
Conversation
Columns whose name matches a sensitive pattern (password, email, token, …) render as a placeholder instead of the real value. A header eye toggle reveals a whole column; a per-cell eye reveals just that cell. Masked cells cannot be edited until revealed, and reveal state resets when the result data changes. Masking is display-only: copy and export keep the real values — write-path anonymization is tracked separately in TabularisDB#483. Adds a Settings → Privacy tab with an on/off toggle, editable name patterns, and per-connection include/exclude overrides (table.column, exclude wins over include and patterns). Closes TabularisDB#485
# Conflicts: # src/components/ui/DataGrid.tsx # src/components/ui/DataGridRow.tsx # tests/components/ui/DataGrid.test.tsx
|
First of all, I really like this feature. The display-only approach with per-cell and per-column reveal is exactly what #485 asked for, and the test coverage is appreciated. Before merging I'd like to request a few changes, mostly about consistency with the rest of the app:
The core masking logic looks solid, so nothing to change there. Happy to merge once these points are addressed! |
- Privacy tab: use the shared Select component for the connection picker instead of a native select - Settings sidebar: move Privacy after Appearance - Connection modal: manage per-connection masking overrides from a Privacy tab (edit mode only — overrides are keyed by the saved connection id), reusing the extracted MaskingOverridesEditor shared with the settings tab
…umn-masking # Conflicts: # src/components/modals/NewConnectionModal.tsx
|
thanks @debba i've made the requested tweaks and will be pushing shortly. |
Closes #485
What
Columns whose name matches a sensitive pattern (password, email, token, ssn, …) now render as a
••••••placeholder in the results grid instead of the real value.Masking is display-only: copy (⌘/Ctrl+C, context menu) and export keep the real values, as requested in the issue. Write-path anonymization for exports is tracked separately in #483.
Settings
New Settings → Privacy tab:
table.columnentries —excludewins overinclude, which wins over name patternsImplementation
src/utils/columnMasking.ts— pattern/overrides matching logicDataGrid.tsx/DataGridRow.tsx— masked rendering + reveal togglesSettingsContext.ts—columnMaskingEnabled/columnMaskingPatterns/columnMaskingOverridessettingsPrivacyTab.tsx+ tab registration inSettings.tsxTests
tests/utils/columnMasking.test.ts)tsc -band eslint clean