G&M Maintenance Portal - Session Notes (Session 2)
Date: February 5, 2026
What We Worked On
- Implemented Tiptap rich text editor for the Other Updates / customNotes field (bold, italic, bullet lists)
- Diagnosed and fixed portal report visibility bug for Chandler Conway (report had
siteId: nullbut client had a Site) - Added draft report visibility feature — clients see disabled "In Progress" cards, admins can click through to preview
- Fixed Vercel deploy error caused by
CRON_SECRETenv var having trailing whitespace/newlines - Upgraded Next.js from 15.5.7 → 15.5.12 to resolve security vulnerability warning
Key Decisions Made
- Draft reports: clients see disabled "In Progress" cards (not hidden entirely), admins can click through
- Tiptap editor configured with starter-kit but heading/codeBlock/blockquote/horizontalRule disabled — just bold, italic, bullet list
- Portal renders customNotes HTML via
dangerouslySetInnerHTMLwith.portal-notesCSS class for styling - Next.js upgrade stayed on 15.5.x backport line (15.5.12) rather than jumping to 16.x — minimal risk
Changes Made
4 commits pushed to main:
-
990857d- Add: Tiptap rich text editor for Other Updates (5 files) -frontend/components/Admin/RichTextEditor.tsx— NEW: Tiptap WYSIWYG component with toolbar -frontend/components/Admin/ReportForm.tsx— replaced Textarea with RichTextEditor -frontend/app/portal/[token]/reports/[id]/page.tsx—dangerouslySetInnerHTMLfor customNotes -frontend/app/globals.css—.portal-notesstyles for rendered HTML -frontend/package.json— added@tiptap/react,@tiptap/starter-kit,@tiptap/pm -
983110d- Add: Draft report visibility on portal with admin preview (4 files) -frontend/lib/auth/validateToken.ts— removedstatus: "published"filter so drafts are included -frontend/app/portal/[token]/page.tsx— draft card shows "In Progress" for clients, clickable for admins -frontend/app/portal/[token]/reports/page.tsx— same pattern on reports list -frontend/app/portal/[token]/reports/[id]/page.tsx— blocks non-admin access to draft report detail -
c0a535c- Fix: Upgrade Next.js 15.5.7 → 15.5.12 (security patch) -frontend/package.json— version bump -frontend/package-lock.json— lockfile update
Vercel env var fix (no commit):
- Trimmed whitespace from CRON_SECRET in all 3 environments (Production, Preview, Development)
- Triggered manual redeploy — succeeded
Database fix (no commit):
- Linked Chandler Conway's report to Main Site (siteId update) and set status to published
Still Pending
- Nothing left unfinished — all changes deployed
Technical Notes
- Tiptap requires
immediatelyRender: falseinuseEditorconfig for SSR compatibility — without it you get hydration mismatch errors fill()in Chrome DevTools MCP appends to textareas instead of replacing — useevaluate_scriptwith native setter to properly clear and set textarea values- When pasting env vars into Vercel, watch for trailing newlines — Vercel now validates
CRON_SECRETfor whitespace and blocks deploys - The
validateTokenfunction has two code paths:client.sites.length > 0(multi-site) vs single-site fallback — reports must be linked to the correct site or they'll be invisible on the portal
Session saved Feb 5, 2026 ~4:20 PM CST