Repository source: docs/plans/archive/forte_reply_step1_solution_assessment.md
Forte Reply — Step 1: Solution Assessment
Problem
Forte's paned reader has a disabled "Reply" toolbar button (templates/pages/forte.php:10-13) with no way to compose a reply to the selected post, while the classic thread view already supports replying via /compose/reply and POST /api/create_reply.
Option A: Enable full-page reply (reuse classic flow as-is)
Enable the toolbar button to link to the existing
/compose/reply?thread_id=...&parent_id=...classic page (same aspost_card.php:103)Pros: zero new code beyond a link/enabled state; reuses proven, tested compose flow; no new JS
Cons: leaves the paned/newsreader UI entirely, breaking the "single-window" Forte experience; jarring UX regression compared to the rest of Forte's in-pane interactions
Option B: In-pane composer, classic markup/styling
Clicking "Reply" reveals
partials/reply_form.phpinside the content pane as-is, pre-filled withthread_id/parent_id; submits as a normal form POST to/compose/replyand redirects back into FortePros: stays inside the paned window structurally; reuses existing partial and backend endpoint untouched; minimal new JS (toggle visibility only)
Cons: form still carries
site.csslook (labels/buttons/spacing) transplanted into the paned window — functionally in-pane but visually foreign to the newsreader chrome; full page reload resets pane state (scroll/open folders) unless carried via redirect params
Option B+: In-pane composer, restyled to match Forte chrome
Same structure as B (reuse
reply_form.php, standard POST to/compose/reply), but the composer is presented as a native paned-window element: rendered as a bordered "Compose" panel usingforte.cssclasses consistent with the toolbar/statusbar look (retro-window borders, same font/spacing aspaned-content-pane), scoped under.paned-windowper the existing CSS-isolation rulePros: same low backend/JS cost as B, but closes the visual gap the user flagged; no markup fork — same
reply_form.phppartial, only its container/classes differ per surface; consistent with howforte.cssalready restyles shared partials (folder tree, post list) to fit the paned aestheticCons: needs a small set of Forte-specific CSS classes for the compose panel (already anticipated by the isolation work, not a new mechanism); still has the reload/state-reset con from B
Option C: In-pane composer with AJAX submit (/api/create_reply)
Same in-pane composer as Option B, but submit via
fetchtoPOST /api/create_reply, then inject the new post into the pane and updatereply_count/tree client-side without a page reloadPros: best newsreader UX — no reload, state fully preserved, feels native to the paned interface
Cons: meaningfully more new JS in
paned_reader.js(submit handling, error/validation display, DOM patching for the reply tree and list pane); more surface area to test; duplicates some rendering logic already done server-side inbuildReplyTree()
Recommendation
Option B+. It closes the gap flagged by the disabled button, keeps the interaction inside the paned window (unlike A), and looks like it belongs there rather than a bare classic form dropped in place — while still reusing the existing form partial and /compose/reply endpoint unchanged, matching this codebase's stated preference for reusing shared components/API contracts over forking new ones. Option C's async polish is a reasonable future enhancement but isn't justified yet given no existing AJAX reply pattern to reuse.