feat: zero-API-key panel degradation (#58, #56)#101
Merged
Conversation
Add renderDegraded()/clearDegraded() primitives to PanelBase so panels can show styled configuration hints when data sources are unavailable. Wire degraded payloads into AIBriefPanel, add skeleton lifecycle to EntityTrackerPanel, and introduce an App-level 15s initial-load timeout that degrades all panels with no data. Real data always wins -- markDataReceived() clears any degraded state automatically. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- PanelBase.renderDegraded: sanitize innerHTML via DOMPurify to prevent XSS - ServiceStatusPanel: add markDataReceived() in renderStatus(), cleanupTimers() in destroy() - AIBriefPanel: set hasReceivedData on degraded path to prevent timeout overwrite - App: remove hasAnyDataReceived() guard so degradeUnreceivedPanels runs unconditionally Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
updateAll() pushes source items to all panels including AIBriefPanel. Without a shape check, the panel called markDataReceived() on source item arrays, preventing the 15s degradation timeout from firing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7e663ac to
381d33d
Compare
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
renderDegraded()/clearDegraded()primitives toPanelBasefor graceful panel degradation with styled messages and actionable CLI hintsAIBriefPanelso it shows a configure message when AI generation fails, and add missing skeleton lifecycle toEntityTrackerPanel.panel-degradedand.panel-configure-hintstatesmarkDataReceived()automatically clears any degraded stateTest plan
renderDegraded()creates.panel-degradedelement in containerclearDegraded()removes the degraded elementmarkDataReceived()callsclearDegraded()(data arrival clears degradation)renderDegraded()then sending data restores normal panel state.panel-configure-hintstylingnpx tsc --noEmitpasses with zero errorsnpx vitest runpasses all 752 tests (39 test files, 7 new)Closes #58, closes #56
🤖 Generated with Claude Code