Skip to content

Commit 827babc

Browse files
luoxuanzaoQoder-AI
andauthored
feat(header): move the credits usage button into the view header (#74)
The gauge that opens the plan and add-on quota panel sat at the end of the composer's icon row; account-level information reads better in the header, next to the feedback and settings buttons. The panel now opens downward from the header instead of upward from the input footer. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
1 parent 32373d1 commit 827babc

3 files changed

Lines changed: 21 additions & 14 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ version with its date and start a fresh empty `[Unreleased]` above it.
1111

1212
## [Unreleased]
1313

14+
### Changed
15+
16+
- The usage button — the gauge that opens your plan and add-on quota panel —
17+
moved from the composer's icon row into the view header, beside the feedback
18+
and settings buttons. Its panel now opens downward from the header; the new
19+
tab, new conversation, and history buttons stay in the composer row.
20+
1421
## [1.0.13] - 2026-09-20
1522

1623
### Added

‎src/features/chat/chat-view.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ export class QoderianView extends ItemView {
236236
setIcon(this.updateBadgeEl, 'download');
237237
void this.refreshUpdateBadge();
238238

239+
// Credits usage popover (account-level, shared across tabs)
240+
const agentCatalog = this.plugin.qoderServices.agentCatalog;
241+
this.creditsUsageButton = new CreditsUsageButton(headerActions, {
242+
getCachedUsage: () => agentCatalog.getUsageInfo(),
243+
fetchUsage: () => fetchCreditsUsage(this.plugin),
244+
subscribeRuntimeStatus: (listener) => agentCatalog.subscribeRuntimeStatus(listener),
245+
});
246+
239247
const feedbackBtn = headerActions.createDiv({ cls: 'qoderian-header-btn' });
240248
setIcon(feedbackBtn, 'message-circle-question');
241249
setButtonTooltip(feedbackBtn, t('commands.submitFeedback'));
@@ -299,14 +307,6 @@ export class QoderianView extends ItemView {
299307
this.toggleHistoryDropdown();
300308
});
301309

302-
// Credits usage popover (account-level, shared across tabs)
303-
const agentCatalog = this.plugin.qoderServices.agentCatalog;
304-
this.creditsUsageButton = new CreditsUsageButton(navActionsEl, {
305-
getCachedUsage: () => agentCatalog.getUsageInfo(),
306-
fetchUsage: () => fetchCreditsUsage(this.plugin),
307-
subscribeRuntimeStatus: (listener) => agentCatalog.subscribeRuntimeStatus(listener),
308-
});
309-
310310
return wrapper;
311311
}
312312

‎src/style/toolbar/credits-usage.css‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Credits usage button + popover panel (nav row, mirrors Qoder IDE usage view) */
1+
/* Credits usage button + popover panel (view header, mirrors Qoder IDE usage view) */
22

33
.qoderian-credits-container {
44
position: static;
@@ -9,13 +9,13 @@
99
align-items: center;
1010
}
1111

12-
/* Panel opens upward from the input footer, right-aligned. Width tracks the
13-
footer so narrow sidebars clip neither edge (same approach as #18). */
12+
/* Panel opens downward from the header, right-aligned. Width tracks the header
13+
so narrow sidebars clip neither edge (same approach as #18). */
1414
.qoderian-credits-panel {
1515
display: none;
1616
position: absolute;
17-
bottom: 100%;
18-
margin-bottom: 4px;
17+
top: 100%;
18+
margin-top: 6px;
1919
inset-inline-end: 0;
2020
width: min(320px, calc(100% - 16px));
2121
padding: 12px;
@@ -24,7 +24,7 @@
2424
-webkit-backdrop-filter: blur(20px);
2525
border: 1px solid var(--background-modifier-border);
2626
border-radius: 8px;
27-
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
27+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
2828
z-index: 1000;
2929
}
3030

0 commit comments

Comments
 (0)