[Feature] Implement Session Mode UI for "Fund Once, Ask Many" interactions #67

Open
opened 2026-03-22 11:41:58 +00:00 by manus · 0 comments

Problem Description

Currently, each interaction with the Timmy Tower Workshop may require individual payment or a complex payment flow, leading to friction for users who wish to engage in multiple interactions. To enhance user experience and streamline the interaction process, a "Session Mode" is proposed.

Session Mode will allow users to fund a session once and then engage in multiple interactions without repeated payment prompts, embodying a "Fund Once, Ask Many" pattern.

Reproduction Steps (Current Behavior)

  1. Interact with Timmy in the Workshop.
  2. Observe the payment flow for each interaction.
  3. Note the potential for repeated payment prompts or complex micro-transaction handling.

Expected Behavior

Users should be able to:

  1. Open a "FUND SESSION" panel.
  2. Create a deposit invoice for a session.
  3. Fund the session, which then becomes active.
  4. Engage in multiple interactions with Timmy within the active session without further payment prompts until the session balance is low or depleted.
  5. Receive clear indications of session status, balance, and options for topping up.

Technical Details

  • Affected Repository: replit/timmy-tower
  • Relevant Files:
    • the-matrix/js/session.js: This frontend file contains the existing implementation for Session Mode, including initSessionPanel(), isSessionActive(), and sessionSendHandler(text). It handles panel buttons, amount presets, deposit/topup invoice creation, polling for session activation/topup, session restore from localStorage, and HUD/input-bar state updates.
    • artifacts/api-server/src/routes/sessions.ts: This backend file provides the REST API for session-funded Workshop interactions, including endpoints for creating sessions, fetching session state, executing requests against funded sessions, and topping up. It handles invoice creation, session authentication, pre-gating with free-tier service, and balance reconciliation.

Proposed Solution

Implement and integrate the Session Mode UI elements and logic in the frontend (the-matrix/js/session.js) to provide a seamless user experience for funding and managing interaction sessions. This includes:

  • Activating and refining the "FUND SESSION" panel.
  • Ensuring proper display of session status, remaining balance, and options for topping up.
  • Integrating the sessionSendHandler to route input-bar sends to POST /api/sessions/:id/request when a session is active.
  • Providing clear visual feedback to the user regarding session activity and payment status.

Labels

feature, frontend, backend, ux, payment, session

## Problem Description Currently, each interaction with the Timmy Tower Workshop may require individual payment or a complex payment flow, leading to friction for users who wish to engage in multiple interactions. To enhance user experience and streamline the interaction process, a "Session Mode" is proposed. Session Mode will allow users to fund a session once and then engage in multiple interactions without repeated payment prompts, embodying a "Fund Once, Ask Many" pattern. ## Reproduction Steps (Current Behavior) 1. Interact with Timmy in the Workshop. 2. Observe the payment flow for each interaction. 3. Note the potential for repeated payment prompts or complex micro-transaction handling. ## Expected Behavior Users should be able to: 1. Open a "FUND SESSION" panel. 2. Create a deposit invoice for a session. 3. Fund the session, which then becomes active. 4. Engage in multiple interactions with Timmy within the active session without further payment prompts until the session balance is low or depleted. 5. Receive clear indications of session status, balance, and options for topping up. ## Technical Details - **Affected Repository:** `replit/timmy-tower` - **Relevant Files:** - `the-matrix/js/session.js`: This frontend file contains the existing implementation for Session Mode, including `initSessionPanel()`, `isSessionActive()`, and `sessionSendHandler(text)`. It handles panel buttons, amount presets, deposit/topup invoice creation, polling for session activation/topup, session restore from localStorage, and HUD/input-bar state updates. - `artifacts/api-server/src/routes/sessions.ts`: This backend file provides the REST API for session-funded Workshop interactions, including endpoints for creating sessions, fetching session state, executing requests against funded sessions, and topping up. It handles invoice creation, session authentication, pre-gating with free-tier service, and balance reconciliation. ## Proposed Solution Implement and integrate the Session Mode UI elements and logic in the frontend (`the-matrix/js/session.js`) to provide a seamless user experience for funding and managing interaction sessions. This includes: - Activating and refining the "FUND SESSION" panel. - Ensuring proper display of session status, remaining balance, and options for topping up. - Integrating the `sessionSendHandler` to route input-bar sends to `POST /api/sessions/:id/request` when a session is active. - Providing clear visual feedback to the user regarding session activity and payment status. ## Labels `feature`, `frontend`, `backend`, `ux`, `payment`, `session`
claude was assigned by Rockachopa 2026-03-22 23:37:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: replit/timmy-tower#67