fix(portal): NIETE WhatsApp number, mobile nav tray, dropdown overflow (bd-2465/2466/2467) - #87
Merged
Merged
Conversation
Three reported portal issues. #4 (portal reimplements the bot's level logic) and #6 (Beacon House capstone) are deliberately NOT here — both deferred to a keyboard session. bd-2465 — every WhatsApp CTA opened Rumi, not NIETE. `https://wa.me/message/WCYNS4DTDB2MD1` was hardcoded in 11 places across 9 files. A wa.me short-link resolves to whoever owns the code, so the URL contains no number to read — which is exactly why the wrong bot went unnoticed at every one of those call sites. Now one constant in lib/whatsapp.ts holding NIETE's 923206281951, in the direct `wa.me/<number>` form that says plainly which bot it opens. bd-2466 — the mobile bottom bar cropped. It rendered every nav item plus Logout in one flex row: seven cells for teachers, ~52px each on a 360px screen. Now the four the operator named (Dashboard, Curriculum, Training, Coaching) stay in the bar and the rest — My Plans, Analytics, Logout — move into a bottom Sheet behind "More". The More cell shows active styling when the current route lives inside it, so the tray never hides where you are. Leader nav has no matching titles, so it falls through to first-four-plus-tray rather than emptying the bar; there's a test for that. bd-2467 — dropdowns cropped on mobile. Two faults, one file, and they explain both reported symptoms: * Text spilling OUT of the control: SelectTrigger had `[&>span]:line-clamp-1`, but the span is a flex child and flex children default to min-width:auto — so it refused to shrink below its content and the clamp never engaged. Added min-w-0 (plus flex-1 and shrink-0 on the chevron). * Options cropped at the screen edge: SelectContent set a min-width from the trigger but no max-width, so one long option widened the panel past the viewport. Capped to calc(100vw-2rem), and option rows now wrap instead of forcing the panel wider — a clipped chapter title is usually unreadable, a two-line row is not. Both live in the shared primitive, so the fix is platform-wide; a test asserts no page hand-rolls its own SelectPrimitive trigger and escapes it. Tests: tests/portal/portal-ui-contracts.test.js (14). These assert on file contents, not rendering — there is no TSX transform in this runner and no browser here. They pin the exact tokens a future edit would silently drop. They CANNOT tell you it looks right on a phone: the tray layout and the wrapped dropdown rows need a human eye. Full suite matches the main baseline: 144 failed both sides, +14 passed, no new failing suites. Closes: bd-2465 Closes: bd-2466 Closes: bd-2467
hatafatif
added a commit
that referenced
this pull request
Aug 1, 2026
build(portal): rebuild SPA dist — #87 merged but never shipped (the manual dist process is broken)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three of the six reported portal issues. #4 (portal reimplements the bot's level logic) and #6 (Beacon House capstone) are deliberately not here — both deferred to a keyboard session.
bd-2465 — every WhatsApp CTA opened Rumi, not NIETE
https://wa.me/message/WCYNS4DTDB2MD1was hardcoded in 11 places across 9 files.A
wa.me/message/…short-link resolves to whoever owns the code, so the URL contains no phone number to read — which is exactly why the wrong bot survived at all eleven call sites. Nothing in the source looked wrong.Now one constant,
portal/src/lib/whatsapp.ts, holding NIETE's923206281951in the directwa.me/<number>form that states plainly which bot it opens.bd-2466 — the mobile bottom bar cropped
It rendered every nav item plus Logout in one flex row — seven cells for teachers, roughly 52px each on a 360px screen.
The four you named (Dashboard, Curriculum, Training, Coaching) stay in the bar; My Plans, Analytics and Logout move into a bottom Sheet behind More.
Two details worth knowing:
bd-2467 — dropdowns cropped on mobile
Two faults in one file, and they explain both symptoms you described separately.
Text spilling out of the control (your #5) —
SelectTriggerhad[&>span]:line-clamp-1, but the span is a flex child, and flex children default tomin-width: auto. It refused to shrink below its content width, so the clamp never engaged. Addedmin-w-0(plusflex-1, andshrink-0on the chevron so it isn't squashed once the value can shrink).Options cropped at the screen edge (your #3) —
SelectContentset a min-width from the trigger but no max-width, so a single long option widened the panel past the viewport. Capped tocalc(100vw-2rem), and option rows now wrap rather than forcing the panel wider — a clipped chapter title is usually unreadable, a two-line row is not.Both fixes live in the shared primitive, so this is platform-wide. A test asserts no page hand-rolls its own
SelectPrimitive.Triggerand escapes it.Verification, and its limits
tests/portal/portal-ui-contracts.test.js— 14 tests. Full suite 144 failed / 1989 passed vs a freshmainbaseline of 144 failed / 1975 passed; zero new failures.Read this before trusting the green tick. These tests assert on file contents, not rendering — there is no TSX transform in this runner and no browser in my environment. They pin the exact tokens a future edit would silently drop, which is genuinely useful for regression. They cannot tell you it looks right on a phone.
So the three things needing your eye:
I also couldn't typecheck (no TypeScript installed here), so a build error would surface at deploy rather than in CI.
Closes: bd-2465, bd-2466, bd-2467
🤖 Generated with Claude Code