fix(terra): surface Claude usage errors and retry sooner
The CLD panel went blank with no reason when Claude Code's saved OAuth token had expired and the widget's own renewal was refused. - Collapsed panel shows EXPIRED/ERR instead of dashes; failures are logged to `qs log`. - Retry every minute after a failure instead of every 5. - claude-usage identifies as claude-cli, the suspected cause of the refresh 429s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ BarPanel {
|
||||
property var sevenDay: usage.sevenDay
|
||||
property var extra: usage.extra
|
||||
property string error: usage.error
|
||||
property string shortError: usage.shortError
|
||||
property bool ready: usage.ready
|
||||
|
||||
readonly property var usage: ClaudeState {}
|
||||
@@ -74,6 +75,8 @@ BarPanel {
|
||||
required property var modelData
|
||||
spacing: 4
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
// Dashes say nothing; with no numbers yet the error label stands alone.
|
||||
visible: claude.ready || claude.shortError === ""
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -93,6 +96,16 @@ BarPanel {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: claude.shortError !== ""
|
||||
text: claude.shortError
|
||||
color: Theme.hot
|
||||
font.family: Theme.displayFont
|
||||
font.pixelSize: 13
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
|
||||
Reference in New Issue
Block a user