Skip to content

Commit 232dc04

Browse files
author
李杰
committed
release: v0.20.9
1 parent 9c60dc3 commit 232dc04

34 files changed

Lines changed: 1855 additions & 265 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ All notable changes to Cockpit Tools will be documented in this file.
66

77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
88

9+
---
10+
## [0.20.9] - 2026-03-25
11+
12+
### Added
13+
- **Added a classic sidebar layout mode with full platform navigation, collapsible sidebar width, grouped-entry expansion, and an in-sidebar logs entry**: users can now switch from the compact original rail to a full-height classic navigation shell that supports inline group children and adaptive scaling in constrained window heights.
14+
15+
### Changed
16+
- **Sidebar layout configuration now supports mode-specific behavior across Settings and platform layout management**: Settings now provides an `Original / Classic` layout selector, first-time entry into classic mode syncs sidebar entries from dashboard visibility, and the platform layout modal now allows unlimited sidebar selections in classic mode while keeping the original mode limit.
17+
- **Antigravity account quota display groups are now fixed to built-in model families (Claude / Gemini Pro / Gemini Flash)**: account page rendering now uses predefined display groups directly, and no longer depends on manual group-settings configuration.
18+
- **Documentation now includes Arch Linux AUR installation paths**: README and README.en.md now document both source-built (`cockpit-tools`) and prebuilt (`cockpit-tools-bin`) AUR packages.
19+
920
---
1021
## [0.20.8] - 2026-03-24
1122

CHANGELOG.zh-CN.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66

77
格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/)
88

9+
---
10+
## [0.20.9] - 2026-03-25
11+
12+
### 新增
13+
- **新增经典侧边栏布局模式,支持完整平台导航、侧边栏折叠、分组子项展开与侧边栏内日志入口**:用户可从紧凑原始导航切换为全高经典导航形态,在窗口高度受限时也会按自适应缩放保持可用。
14+
15+
### 变更
16+
- **侧边栏布局配置现已支持按模式生效的管理行为**:设置页新增 `原始布局 / 经典布局` 切换;首次进入经典布局会按仪表盘可见项同步侧边栏入口;平台布局弹窗在经典布局下允许选择任意数量侧边栏入口,原始布局仍保持数量上限。
17+
- **Antigravity 账号额度展示分组现已固定为内置模型族(Claude / Gemini Pro / Gemini Flash)**:账号页展示分组改为直接使用预置分组,不再依赖手动分组配置。
18+
- **文档现已补充 Arch Linux 的 AUR 安装路径**`README.md``README.en.md` 新增源码包(`cockpit-tools`)与预编译包(`cockpit-tools-bin`)两种安装方式说明。
19+
920
---
1021
## [0.20.8] - 2026-03-24
1122

README.en.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,18 @@ Or force overwrite the existing app:
324324
brew install --cask --force cockpit-tools
325325
```
326326

327+
### Option C: Arch Linux (AUR)
328+
329+
Install via an AUR helper such as `yay` or `paru`:
330+
331+
```bash
332+
# Source-built package
333+
yay -S cockpit-tools
334+
335+
# Prebuilt binary package
336+
yay -S cockpit-tools-bin
337+
```
338+
327339
### 🛠️ Troubleshooting
328340

329341
#### macOS says "App is damaged and can't be opened"?

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,18 @@ brew install --cask cockpit-tools
319319
brew install --cask --force cockpit-tools
320320
```
321321

322+
### 选项 C: Arch Linux (AUR)
323+
324+
可通过 AUR 助手(如 `yay``paru`)安装:
325+
326+
```bash
327+
# 源码构建包
328+
yay -S cockpit-tools
329+
330+
# 预编译二进制包
331+
yay -S cockpit-tools-bin
332+
```
333+
322334
### 🛠️ 常见问题排查 (Troubleshooting)
323335

324336
#### macOS 提示“应用已损坏,无法打开”?

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cockpit-tools",
33
"private": true,
4-
"version": "0.20.8",
4+
"version": "0.20.9",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cockpit-tools"
3-
version = "0.20.8"
3+
version = "0.20.9"
44
description = "Cockpit Tools"
55
authors = ["jlcodes"]
66
license = "CC-BY-NC-SA-4.0"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Cockpit Tools",
4-
"version": "0.20.8",
4+
"version": "0.20.9",
55
"identifier": "com.jlcodes.cockpit-tools",
66
"build": {
77
"beforeDevCommand": "npm run dev",

src/App.tsx

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import { useQoderAccountStore } from './stores/useQoderAccountStore';
2929
import { useTraeAccountStore } from './stores/useTraeAccountStore';
3030
import { useWorkbuddyAccountStore } from './stores/useWorkbuddyAccountStore';
3131
import { useZedAccountStore } from './stores/useZedAccountStore';
32+
import { useSideNavLayoutStore } from './stores/useSideNavLayoutStore';
33+
import { usePlatformLayoutStore } from './stores/usePlatformLayoutStore';
3234
import type { UpdateCheckResult, UpdateInfo } from './components/UpdateNotification';
3335
import type { Update as UpdaterUpdate } from '@tauri-apps/plugin-updater';
3436
import { parseUpdaterReleaseNotes, resolveUpdaterDownloadUrl } from './utils/updaterReleaseNotes';
@@ -374,6 +376,11 @@ function getQuotaAlertQuickSettingsType(platform: QuotaAlertPlatform): QuickSett
374376

375377
function MainApp() {
376378
const { t } = useTranslation();
379+
const sideNavLayoutMode = useSideNavLayoutStore((state) => state.mode);
380+
const sideNavClassicCollapsed = useSideNavLayoutStore((state) => state.classicCollapsed);
381+
const sideNavClassicFirstSyncDone = useSideNavLayoutStore((state) => state.classicFirstSyncDone);
382+
const markSideNavClassicFirstSyncDone = useSideNavLayoutStore((state) => state.markClassicFirstSyncDone);
383+
const syncSidebarEntriesFromDashboard = usePlatformLayoutStore((state) => state.syncSidebarEntriesFromDashboard);
377384
const [page, setPage] = useState<Page>('dashboard');
378385
const [showUpdateNotification, setShowUpdateNotification] = useState(false);
379386
const [updateNotificationKey, setUpdateNotificationKey] = useState(0);
@@ -454,6 +461,19 @@ function MainApp() {
454461
// 启用自动刷新 hook
455462
useAutoRefresh();
456463

464+
useEffect(() => {
465+
if (sideNavLayoutMode !== 'classic' || sideNavClassicFirstSyncDone) {
466+
return;
467+
}
468+
syncSidebarEntriesFromDashboard();
469+
markSideNavClassicFirstSyncDone();
470+
}, [
471+
sideNavLayoutMode,
472+
sideNavClassicFirstSyncDone,
473+
syncSidebarEntriesFromDashboard,
474+
markSideNavClassicFirstSyncDone,
475+
]);
476+
457477
const openUpdateNotification = useCallback((source: UpdateCheckSource) => {
458478
if (source === 'manual') {
459479
window.dispatchEvent(new CustomEvent('update-check-started', { detail: { source } }));
@@ -2466,7 +2486,9 @@ function MainApp() {
24662486
|| (updateRemindersEnabled && updateAction.state !== 'hidden');
24672487

24682488
return (
2469-
<div className="app-container">
2489+
<div
2490+
className={`app-container${sideNavLayoutMode === 'classic' ? ' app-container-side-nav-classic' : ''}${sideNavLayoutMode === 'classic' && sideNavClassicCollapsed ? ' app-container-side-nav-classic-collapsed' : ''}`}
2491+
>
24702492
{/* 更新通知:活跃状态时保持挂载,关闭后继续保留当前更新状态 */}
24712493
{shouldRenderUpdateNotification && (
24722494
<div style={showUpdateNotification ? undefined : { display: 'none' }}>
@@ -2646,16 +2668,19 @@ function MainApp() {
26462668
updateProgress={updateAction.progress}
26472669
onUpdateActionClick={handleQuickUpdateActionClick}
26482670
updateRemindersEnabled={updateRemindersEnabled}
2671+
onOpenLogViewer={() => setShowLogViewer(true)}
26492672
/>
26502673

2651-
<button
2652-
className="log-entry-fab"
2653-
onClick={() => setShowLogViewer(true)}
2654-
title={t('manual.dataPrivacy.keywords.5', '日志')}
2655-
aria-label={t('manual.dataPrivacy.keywords.5', '日志')}
2656-
>
2657-
<FileText size={18} />
2658-
</button>
2674+
{sideNavLayoutMode !== 'classic' && (
2675+
<button
2676+
className="log-entry-fab"
2677+
onClick={() => setShowLogViewer(true)}
2678+
title={t('manual.dataPrivacy.keywords.5', '日志')}
2679+
aria-label={t('manual.dataPrivacy.keywords.5', '日志')}
2680+
>
2681+
<FileText size={18} />
2682+
</button>
2683+
)}
26592684

26602685
<Suspense fallback={null}>
26612686
<PlatformLayoutModal

src/components/PlatformLayoutModal.tsx

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
resolveGroupChildName,
3636
usePlatformLayoutStore,
3737
} from '../stores/usePlatformLayoutStore';
38+
import { useSideNavLayoutStore } from '../stores/useSideNavLayoutStore';
3839
import { getPlatformLabel, renderPlatformIcon } from '../utils/platformMeta';
3940

4041
const PLATFORM_LAYOUT_ICON_STORAGE_KEY = 'agtools.platform_layout.custom_icons.v1';
@@ -342,6 +343,9 @@ export function PlatformLayoutModal({
342343
onClose,
343344
}: PlatformLayoutModalProps) {
344345
const { t } = useTranslation();
346+
const sideNavLayoutMode = useSideNavLayoutStore((state) => state.mode);
347+
const isSidebarSelectionLimited = sideNavLayoutMode === 'original';
348+
const sidebarSelectionLimit = isSidebarSelectionLimited ? 2 : Number.MAX_SAFE_INTEGER;
345349
const {
346350
orderedEntryIds,
347351
hiddenEntryIds,
@@ -715,10 +719,11 @@ export function PlatformLayoutModal({
715719
if (!enabled) {
716720
return;
717721
}
718-
entries
719-
.filter((entry) => !entry.hidden)
720-
.slice(0, 2)
721-
.forEach((entry) => setSidebarEntry(entry.id, true));
722+
const visibleEntries = entries.filter((entry) => !entry.hidden);
723+
const targetEntries = isSidebarSelectionLimited
724+
? visibleEntries.slice(0, sidebarSelectionLimit)
725+
: visibleEntries;
726+
targetEntries.forEach((entry) => setSidebarEntry(entry.id, true));
722727
};
723728

724729
const handleBulkDashboard = (enabled: boolean) => {
@@ -735,7 +740,9 @@ export function PlatformLayoutModal({
735740
() => entries.filter((entry) => !entry.hidden),
736741
[entries],
737742
);
738-
const sidebarBulkTargetCount = Math.min(2, sidebarVisibleEntries.length);
743+
const sidebarBulkTargetCount = isSidebarSelectionLimited
744+
? Math.min(sidebarSelectionLimit, sidebarVisibleEntries.length)
745+
: sidebarVisibleEntries.length;
739746
const sidebarBulkEnabled = sidebarBulkTargetCount > 0
740747
&& sidebarVisibleEntries.filter((entry) => sidebarSet.has(entry.id)).length >= sidebarBulkTargetCount;
741748
const dashboardBulkEnabled = entries.length > 0 && entries.every((entry) => !entry.hidden);
@@ -1014,11 +1021,16 @@ export function PlatformLayoutModal({
10141021
<div className="modal-body platform-layout-modal-body">
10151022
<div className="platform-layout-summary">
10161023
<span>
1017-
{t('platformLayout.sidebarSelected', {
1018-
count: sidebarEntryIds.length,
1019-
max: 2,
1020-
defaultValue: '侧边栏已选择 {{count}}/{{max}}',
1021-
})}
1024+
{isSidebarSelectionLimited
1025+
? t('platformLayout.sidebarSelected', {
1026+
count: sidebarEntryIds.length,
1027+
max: sidebarSelectionLimit,
1028+
defaultValue: '侧边栏已选择 {{count}}/{{max}}',
1029+
})
1030+
: t('platformLayout.sidebarSelectedUnlimited', {
1031+
count: sidebarEntryIds.length,
1032+
defaultValue: '侧边栏已选择 {{count}}',
1033+
})}
10221034
</span>
10231035
<div className="platform-layout-summary-actions">
10241036
<button className="btn btn-secondary" onClick={openCreateGroupEditor}>
@@ -1032,10 +1044,15 @@ export function PlatformLayoutModal({
10321044
</div>
10331045

10341046
<div className="platform-layout-tip">
1035-
{t(
1036-
'platformLayout.tipWithGroups',
1037-
'拖拽可排序;最多选择两个入口显示在侧边栏。分组子级不参与侧边栏/仪表盘开关,仅用于菜单栏与默认平台切换。',
1038-
)}
1047+
{isSidebarSelectionLimited
1048+
? t(
1049+
'platformLayout.tipWithGroups',
1050+
'拖拽可排序;最多选择两个入口显示在侧边栏。分组子级不参与侧边栏/仪表盘开关,仅用于菜单栏与默认平台切换。',
1051+
)
1052+
: t(
1053+
'platformLayout.tipWithGroupsUnlimited',
1054+
'拖拽可排序;可选择任意数量入口显示在侧边栏。分组子级不参与侧边栏/仪表盘开关,仅用于菜单栏与默认平台切换。',
1055+
)}
10391056
</div>
10401057

10411058
<div className="platform-layout-bulk-header">
@@ -1097,7 +1114,7 @@ export function PlatformLayoutModal({
10971114
>
10981115
{entries.map((entry) => {
10991116
const selected = sidebarSet.has(entry.id);
1100-
const sidebarFull = sidebarEntryIds.length >= 2;
1117+
const sidebarFull = isSidebarSelectionLimited && sidebarEntryIds.length >= sidebarSelectionLimit;
11011118
const sidebarDisabled = entry.hidden || (!selected && sidebarFull);
11021119
const isGroup = entry.type === 'group' && !!entry.group;
11031120
const groupId = entry.id;

0 commit comments

Comments
 (0)