diff --git a/app/api/mam-token/route.js b/app/api/mam-token/route.js index a354eec..bf58e72 100644 --- a/app/api/mam-token/route.js +++ b/app/api/mam-token/route.js @@ -62,7 +62,11 @@ export async function GET() { token: maskToken(token), fullLength: token.length, location: MAM_TOKEN_FILE, - mouseholeInfo: { enabled: false }, + mouseholeInfo: mouseholeEnabled ? { + enabled: true, + usingFallback: true, + error: "state.json not found, using fallback token file" + } : { enabled: false }, }); } catch (error) { console.error(`Failed to read MAM token: ${error.message}`); diff --git a/app/components/TokenManager.jsx b/app/components/TokenManager.jsx index 3552269..67c4333 100644 --- a/app/components/TokenManager.jsx +++ b/app/components/TokenManager.jsx @@ -116,28 +116,53 @@ export default function TokenManager({ onTokenUpdate }) { {isMouseholeMode ? ( // Mousehole Read-Only View
+ Mousehole mode is enabled, but the state.json file couldn't be found. Using fallback token from static file. +
++ Verify that mousehole is running and the volume mount is correct. +
+- Your MAM token is dynamically managed by the mousehole service. Token editing is disabled. -
++ Your MAM token is dynamically managed by the mousehole service. Token editing is disabled. +
+- Status: - {tokenData.exists ? 'Token active' : 'Waiting for mousehole...'} + Status: + {tokenData.exists ? (tokenData.mouseholeInfo?.usingFallback ? 'Using fallback token' : 'Token active') : 'Waiting for mousehole...'}
{tokenData.exists && ( @@ -158,8 +183,13 @@ export default function TokenManager({ onTokenUpdate }) { > )}
- Source: {tokenData.mouseholeInfo?.stateFile || tokenData.location}
+ Source: {tokenData.location}
+ {tokenData.mouseholeInfo.error} +
+ )}