feat: session refresh button in UI + MCP tool #12

Open
opened 2026-04-26 23:07:13 -07:00 by pyr0ball · 0 comments
Owner

Summary

The Reddit Playwright session expires (12hr heuristic). Currently requires Alan to manually run xvfb-run python post.py --login from a terminal.

Requested

  • A "Refresh Session" button in the Magpie UI (Settings or sidebar) that calls ensure_valid_session() / triggers re-login via the existing app/services/reddit/session.py
  • A corresponding refresh_reddit_session MCP tool so Claude Code can trigger re-login without Alan needing to open a terminal

Current infrastructure

  • app/services/reddit/session.pyensure_valid_session(), refresh_session() already implemented
  • mcp/server.js — MCP tool registration pattern established
  • app/api/ — FastAPI router pattern established

Acceptance criteria

  • POST /api/v1/reddit/refresh-session endpoint triggers refresh_session() and returns status
  • Button in Magpie UI calls the endpoint and shows success/error state
  • refresh_reddit_session MCP tool registered in mcp/server.js
  • Session age/validity displayed somewhere in the UI (last refreshed timestamp)
## Summary The Reddit Playwright session expires (12hr heuristic). Currently requires Alan to manually run `xvfb-run python post.py --login` from a terminal. ## Requested - A **"Refresh Session"** button in the Magpie UI (Settings or sidebar) that calls `ensure_valid_session()` / triggers re-login via the existing `app/services/reddit/session.py` - A corresponding `refresh_reddit_session` MCP tool so Claude Code can trigger re-login without Alan needing to open a terminal ## Current infrastructure - `app/services/reddit/session.py` — `ensure_valid_session()`, `refresh_session()` already implemented - `mcp/server.js` — MCP tool registration pattern established - `app/api/` — FastAPI router pattern established ## Acceptance criteria - [ ] `POST /api/v1/reddit/refresh-session` endpoint triggers `refresh_session()` and returns status - [ ] Button in Magpie UI calls the endpoint and shows success/error state - [ ] `refresh_reddit_session` MCP tool registered in `mcp/server.js` - [ ] Session age/validity displayed somewhere in the UI (last refreshed timestamp)
Sign in to join this conversation.
No labels
bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/magpie#12
No description provided.