[PR #57] [MERGED] feat: JanitorAI login for character definitions #4426

Closed
opened 2026-10-22 04:07:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/57
Author: @LukaTheHero
Created: 4/4/2026
Status: ✅ Merged
Merged: 4/4/2026
Merged by: @LukaTheHero

Base: main ← Head: feature/janitorai-login


📝 Commits (1)

  • e254348 feat: JanitorAI login for character definitions + search retry

📊 Changes

2 files changed (+675 additions, -10 deletions)

View changed files

📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+396 -10)
📝 packages/server/src/routes/bot-browser.routes.ts (+279 -0)

📄 Description

JanitorAI Login

What this does:

  • Token-based login for JanitorAI — Users can paste their sb-auth-auth-token cookie from janitorai.com to unlock character definitions (personality, first message, scenario, etc.)
  • NSFW browsing still works without login — login is only needed for viewing character definitions
  • Auto-refresh token — uses Supabase refresh token to keep the session alive
  • Search retry with backoff — JanitorAI search and detail endpoints automatically retry up to 3 times on failure (500/429 errors) with increasing delays
  • Janitor-specific retry UI — when search fails on JanitorAI, shows a prominent message telling users to click retry since JanitorAI is known to need a couple retries
  • Hidden definitions detection — when logged in but definitions are hidden by the author, shows "Definitions Hidden by Author" instead of "Login Required"

How login works:

  1. User logs into janitorai.com in their browser
  2. Opens F12 → Application → Cookies → copies sb-auth-auth-token value
  3. Pastes it into Marinara's login modal
  4. Server decodes the base64 session, extracts access/refresh tokens
  5. Token is used for authenticated API calls to fetch character definitions

Files changed:

  • packages/server/src/routes/bot-browser.routes.ts — JanitorAI login/logout/session routes, auth header injection, retry logic
  • packages/client/src/components/bot-browser/BotBrowserView.tsx — Login modal with token paste UI, session indicators, retry UI

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/57 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/4/2026 **Status:** ✅ Merged **Merged:** 4/4/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `feature/janitorai-login` --- ### 📝 Commits (1) - [`e254348`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e254348e3aaa99d11c72dab00c7444091b0c91eb) feat: JanitorAI login for character definitions + search retry ### 📊 Changes **2 files changed** (+675 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+396 -10) 📝 `packages/server/src/routes/bot-browser.routes.ts` (+279 -0) </details> ### 📄 Description ## JanitorAI Login ### What this does: - **Token-based login for JanitorAI** — Users can paste their `sb-auth-auth-token` cookie from janitorai.com to unlock character definitions (personality, first message, scenario, etc.) - **NSFW browsing still works without login** — login is only needed for viewing character definitions - **Auto-refresh token** — uses Supabase refresh token to keep the session alive - **Search retry with backoff** — JanitorAI search and detail endpoints automatically retry up to 3 times on failure (500/429 errors) with increasing delays - **Janitor-specific retry UI** — when search fails on JanitorAI, shows a prominent message telling users to click retry since JanitorAI is known to need a couple retries - **Hidden definitions detection** — when logged in but definitions are hidden by the author, shows "Definitions Hidden by Author" instead of "Login Required" ### How login works: 1. User logs into janitorai.com in their browser 2. Opens F12 → Application → Cookies → copies `sb-auth-auth-token` value 3. Pastes it into Marinara's login modal 4. Server decodes the base64 session, extracts access/refresh tokens 5. Token is used for authenticated API calls to fetch character definitions ### Files changed: - `packages/server/src/routes/bot-browser.routes.ts` — JanitorAI login/logout/session routes, auth header injection, retry logic - `packages/client/src/components/bot-browser/BotBrowserView.tsx` — Login modal with token paste UI, session indicators, retry UI --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07:31 +07:00
Sign in to join this conversation.
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
Pasta-Devs/Marinara-Engine#4426
No description provided.