fix: Improve mousehole fallback handling and UI feedback#25
Closed
fix: Improve mousehole fallback handling and UI feedback#25
Conversation
- Show fallback status in API response when state.json not found - Add yellow warning banner when using fallback token - Display correct source file path in fallback mode - Improve status message to indicate fallback usage - Add error message display in UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the mousehole fallback UI to properly display when
state.jsonis not found and Scurry falls back to the static token file.Problem
When
MOUSEHOLE_ENABLED=truebut thestate.jsonfile doesn't exist (e.g., mousehole not running or volume mount incorrect), the UI showed:secrets/mam_api_token(confusing - shows static file but implies waiting for mousehole)Solution
API Changes (
app/api/mam-token/route.js)usingFallback: trueflag tomouseholeInfowhen falling back to static tokenUI Changes (
app/components/TokenManager.jsx)usingFallbackis trueAfter Fix
The UI now clearly shows:
secrets/mam_api_token(accurate)Testing
Fixes the issue shown in production where the UI was confusing when mousehole wasn't available.