• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 42279400888
87%

Build:
DEFAULT BRANCH: master
Ran 06 Nov 2026 07:28PM UTC
Jobs 1
Files 191
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Nov 2026 07:24PM UTC coverage: 87.16% (+0.1%) from 87.033%
42279400888

push

github

web-flow
fix(studio): prevent column comment data loss from sensitivity marker (#53051)

## What

Studio stores a column's "sensitive data" flag in-band by adding
`[SENSITIVE]` to the column's comment. The encode/decode helpers matched
the marker **anywhere** in the string, which caused two problems:

* A comment that merely *contains* `[SENSITIVE]` (e.g. `Fields marked
[SENSITIVE] are PII`) was wrongly treated as sensitive.
* The marker was stripped from the **middle** of the user's text on save
- even when the sensitivity toggle was off - silently corrupting
user-authored content.

Discussion: https://github.com/orgs/supabase/discussions/52699

## Changes

Following the direction in the discussion:

1. **One shared helper** - the marker logic was duplicated in three
places (`ColumnEditor.utils.ts`, `state/table-editor-table.tsx`, and the
toggle in `TableEditor/Column.tsx`), each slightly different. These are
consolidated into a single `lib/sensitive-column-comment.ts` with
`isSensitiveComment` / `encodeSensitiveComment` /
`decodeSensitiveComment`.
2. **Prefix-anchored detection and removal** - the marker is only
matched and stripped when it's an exact leading prefix (plus at most one
following space), so a mid-string `[SENSITIVE]` is preserved verbatim.
3. **Standardized the marker position** - `Column.tsx`'s toggle
previously appended the marker to the *end* of the comment, while the
column editor prepended it. The toggle now writes the canonical prefix,
so detection is consistent across all paths.
4. **Backward compatibility** - to avoid losing the flag on columns that
were saved with a *trailing* marker (the old toggle behavior),
`decodeSensitiveComment` also recognizes and strips an existing trailing
marker. Re-saving such a column migrates it to the prefix form.

## Example

```ts
// Before
encodeSensitiveComment('a [SENSITIVE] b', false) // -> 'a  b'  (data loss)

// After
encodeSensitiveComment('a [SENSITIVE] b', false) // -> 'a [SENSITIVE] b'  (prese... (continued)

2071 of 2439 branches covered (84.91%)

Branch coverage included in aggregate %.

18 of 18 new or added lines in 1 file covered. (100.0%)

2864 of 3223 relevant lines covered (88.86%)

200.37 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 42279400888.1 06 Nov 2026 07:28PM UTC 764
38.25
GitHub Action Run
Source Files on build 42279400888
  • Tree
  • List 191
  • Changed 157
  • Source Changed 0
  • Coverage Changed 157
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42279400888
  • 9f351563 on github
  • Prev Build on master (#42269096519)
  • Next Build on master (#42282614685)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc