Skip to content

Stop a note promising the student privacy it does not have - #46

Merged
yt314 merged 1 commit into
mainfrom
note-visibility-says-the-truth
Sep 17, 2026
Merged

yt314 merged 1 commit into
mainfrom
note-visibility-says-the-truth

Conversation

@yt314

@yt314 yt314 commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

The problem

A note marked גלוי לתלמיד is always visible to the parent too. The server enforces it, and rightly — a parent should not be kept from what was written about their child.

The lesson-completion dialog never said so. Two independent checkboxes: tick גלוי לתלמיד, leave גלוי להורה clear, save. The note is stored visible to both, and the teacher has just written something she believes only the student will read.

Proven against the running app:

what the teacher ticked : visibleToStudent=true, visibleToParent=false
what the server stored  : visibleToStudent=true, visibleToParent=true
the parent can read it  : true

The note dialog on the student card already explains the rule in a line under the boxes. So the app had decided how to handle this — the screen used after every single lesson was the one that missed it.

This is the screen where most notes get written: it is inside סיום שיעור, right after the lesson.

The change

Ticking גלוי לתלמיד now ticks גלוי להורה as well, in both dialogs, so the boxes show what will actually be stored instead of a promise the save will break. The completion dialog gets the same explanatory line the other one has.

Unticking גלוי לתלמיד leaves the parent box where it is — a note for the parent only is a real thing to want, and the rule only runs one way.

Why not change the rule instead

The rule is the right one and is deliberate; it is in the server on both POST and PUT, with four tests covering it (create, update, and both read paths). Nothing about it changes here. What changes is that the screen stops disagreeing with it.

Verification

Driven in a browser at 1280px, both dialogs:

completion dialog   BEFORE: student=false  parent=false
                    AFTER ticking גלוי לתלמיד: student=true  parent=true
                    …הערה שמסומנת "גלוי לתלמיד" גלויה אוטומטית גם להורה

student-card dialog BEFORE: student=false  parent=false
                    AFTER:  student=true   parent=true

Nothing was saved (both dialogs cancelled), and the probe note used to prove the original behaviour was deleted; the demo data is untouched. No JS errors.

24 frontend tests pass. Frontend only; no API change.

A note marked "גלוי לתלמיד" is always visible to the parent as well. The
server enforces it, and rightly — a parent should not be kept from what was
written about their child.

The lesson-completion dialog never said so. Two independent checkboxes: tick
"גלוי לתלמיד", leave "גלוי להורה" clear, save. The note is saved visible to
both, and the teacher has just written something she believes only the student
will read. Proven against the running app: ticked student-only, and the parent
read it back.

The note dialog on the student card already explained the rule in a line under
the boxes, so the app had decided how to handle this — the screen used after
every single lesson was the one that missed it.

Ticking "גלוי לתלמיד" now ticks "גלוי להורה" too, in both dialogs, so the boxes
show what will actually be stored rather than a promise the save will break.
The completion dialog gets the same explanatory line as the other. Unticking
"גלוי לתלמיד" leaves the parent box alone: a note for the parent only is a
real thing to want.

The server rule itself is unchanged and stays covered by its four tests.
Verified in a browser in both dialogs: both boxes end up ticked, and nothing
was saved. 24 frontend tests pass.
@vercel

vercel Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
talmidon Ready Ready Preview Sep 17, 2026 4:24pm UTC

@yt314
yt314 merged commit 318cb59 into main Sep 17, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview — 912cd5ce Deployed Sep 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant