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 as post_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.php inside the content pane as-is, pre-filled with thread_id/parent_id; submits as a normal form POST to /compose/reply and redirects back into Forte

  • Pros: stays inside the paned window structurally; reuses existing partial and backend endpoint untouched; minimal new JS (toggle visibility only)

  • Cons: form still carries site.css look (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 using forte.css classes consistent with the toolbar/statusbar look (retro-window borders, same font/spacing as paned-content-pane), scoped under .paned-window per the existing CSS-isolation rule

  • Pros: same low backend/JS cost as B, but closes the visual gap the user flagged; no markup fork — same reply_form.php partial, only its container/classes differ per surface; consistent with how forte.css already restyles shared partials (folder tree, post list) to fit the paned aesthetic

  • Cons: 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 fetch to POST /api/create_reply, then inject the new post into the pane and update reply_count/tree client-side without a page reload

  • Pros: 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 in buildReplyTree()

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.