fix: give notes and todos dedicated workspace layouts
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build darwin arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux x64 Agent (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

Replace the crowded note sidebar with a card overview and full note detail. Keep tasks in a stable split view with source content and AI comments, compact header navigation, and search-adjacent status filters. Preserve drafts and return context.

Validation: 93 focused tests, typecheck, lint, and isolated Electron renderer checks passed. Full suite was interrupted; renderer probes used in-memory APIs.

Release note: Notes now open from a card overview, while todos keep a stable task list beside their details. Compact view and filter controls leave more room for reading and editing.
This commit is contained in:
mesalogo
2026-09-18 21:22:58 +08:00
parent 5aad0cf5f7
commit a8d1dbc11f
11 changed files with 1386 additions and 2474 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -28,8 +28,9 @@ export const magicNotes = {
analyzeAgain: 'Analyze again',
analyzing: 'Analyzing…',
openSourceNote: 'Open source note',
hideListPane: 'Hide left list',
showListPane: 'Show left list',
backToOverview: 'Back to overview',
backToTodos: 'Back to to-dos',
backToTodoList: 'Back to to-do list',
hideAiComments: 'Hide AI comments',
showAiComments: 'Show AI comments',
pinNote: 'Pin note',
@@ -104,8 +105,11 @@ export const magicNotes = {
listLabel: 'To-do list',
detailLabel: 'To-do details',
heading: 'All to-dos',
resultCount: '{{count}} / {{total}} items',
loadingSource: 'Loading source entry…',
retrySource: 'Retry loading source',
searchLabel: 'Search to-dos in the current scope',
searchPlaceholder: 'Search to-dos',
searchPlaceholder: 'Search tasks, instructions, or source notes',
filterLabel: 'Filter to-dos',
filters: {
active: 'Incomplete',
@@ -169,8 +173,6 @@ export const magicNotes = {
'Choose “Analyze with AI” on an entry to show comments here.'
},
accessibility: {
resizeListPane: 'Resize the note list and editor panes',
listPaneWidth: 'Left list, {{width}} pixels',
resizeAiPane: 'Resize the editor and AI comments panes',
aiPaneWidth: 'AI comments pane, {{width}} pixels'
},
@@ -24,8 +24,9 @@ export const magicNotes = {
analyzeAgain: '重新分析',
analyzing: '分析中…',
openSourceNote: '打开原笔记修改',
hideListPane: '隐藏左侧列表',
showListPane: '显示左侧列表',
backToOverview: '返回总览',
backToTodos: '返回待办',
backToTodoList: '返回待办列表',
hideAiComments: '隐藏 AI 评论',
showAiComments: '显示 AI 评论',
pinNote: '置顶笔记',
@@ -98,8 +99,11 @@ export const magicNotes = {
listLabel: '待办列表',
detailLabel: '待办详情',
heading: '全部待办',
resultCount: '{{count}} / {{total}} 项',
loadingSource: '正在加载来源记录…',
retrySource: '重试加载来源',
searchLabel: '搜索当前范围的待办',
searchPlaceholder: '搜索待办',
searchPlaceholder: '搜索任务、说明或来源笔记',
filterLabel: '筛选待办',
filters: {
active: '未完成',
@@ -157,8 +161,6 @@ export const magicNotes = {
manualHint: '在记录上点击“AI 分析”,评论会显示在这里。'
},
accessibility: {
resizeListPane: '调整笔记列表与编辑区宽度',
listPaneWidth: '左侧列表 {{width}} 像素',
resizeAiPane: '调整编辑区与 AI 评论宽度',
aiPaneWidth: 'AI 评论栏 {{width}} 像素'
},
+156 -217
View File
@@ -1260,31 +1260,19 @@
display: grid;
flex: 1;
min-width: 0;
min-height: 520px;
min-height: 0;
overflow: hidden;
border: 1px solid var(--border-default);
border-radius: var(--radius-card);
background: var(--surface-raised);
grid-template-columns:
var(--magic-notes-list-width, 220px) 9px
minmax(300px, 1fr) 9px
var(--magic-notes-ai-width, 280px);
}
.magic-notes-layout--ai-hidden {
grid-template-columns:
var(--magic-notes-list-width, 220px) 9px
minmax(300px, 1fr);
}
.magic-notes-layout--list-hidden {
grid-template-columns:
minmax(300px, 1fr) 9px
var(--magic-notes-ai-width, 280px);
}
.magic-notes-layout--list-hidden.magic-notes-layout--ai-hidden {
grid-template-columns: minmax(300px, 1fr);
.magic-notes-layout--ai-hidden,
.magic-notes-layout--overview {
grid-template-columns: minmax(0, 1fr);
}
.magic-notes-layout--resizing {
@@ -1292,7 +1280,6 @@
user-select: none;
}
.magic-notes-list-resize-handle,
.magic-notes-ai-resize-handle {
position: relative;
z-index: 2;
@@ -1303,14 +1290,6 @@
touch-action: none;
}
.magic-notes-list-resize-handle {
background: linear-gradient(
to right,
var(--surface-subtle) 0 4px,
var(--surface-raised) 4px 100%
);
}
.magic-notes-ai-resize-handle {
background: linear-gradient(
to right,
@@ -1319,7 +1298,6 @@
);
}
.magic-notes-list-resize-handle::after,
.magic-notes-ai-resize-handle::after {
position: absolute;
top: 0;
@@ -1333,25 +1311,20 @@
background var(--motion-fast) ease-out;
}
.magic-notes-list-resize-handle:hover::after,
.magic-notes-list-resize-handle:focus-visible::after,
.magic-notes-ai-resize-handle:hover::after,
.magic-notes-ai-resize-handle:focus-visible::after,
.magic-notes-layout--list-resizing
> .magic-notes-list-resize-handle::after,
.magic-notes-layout--ai-resizing
> .magic-notes-ai-resize-handle::after {
width: 2px;
background: var(--accent);
}
.magic-notes-list-resize-handle:focus-visible,
.magic-notes-ai-resize-handle:focus-visible {
outline: 2px solid var(--accent);
outline-offset: -2px;
}
.magic-notes-list-pane,
.magic-notes-overview,
.magic-notes-stream-pane,
.magic-notes-ai-pane {
min-width: 0;
@@ -1359,37 +1332,32 @@
overflow: auto;
}
.magic-notes-list-pane,
.magic-notes-ai-pane {
background: var(--surface-subtle);
}
.magic-notes-list-pane[hidden],
.magic-notes-overview[hidden],
.magic-notes-ai-pane[hidden] {
display: none;
}
.magic-notes-list-pane {
.magic-notes-overview {
display: flex;
padding: var(--space-4);
flex-direction: column;
gap: var(--space-3);
}
.magic-notes-list-pane > .page-tabs--segmented {
width: 100%;
}
.magic-notes-list-pane > .page-tabs--segmented .page-tabs__tab {
flex: 1;
justify-content: center;
padding-inline: var(--space-2);
.magic-notes-page > .page-header .page-tabs {
flex: 0 0 auto;
align-self: flex-start;
width: fit-content;
}
.magic-notes-library-panel {
display: flex;
min-height: 0;
flex: 1;
flex: 0 0 auto;
flex-direction: column;
gap: var(--space-3);
}
@@ -1571,11 +1539,6 @@
background: var(--surface-muted);
}
.magic-todo-list-item--active {
border-color: var(--accent-selected);
background: var(--accent-subtle);
}
.magic-todo-list-item__check {
display: grid;
width: 28px;
@@ -1603,6 +1566,130 @@
cursor: pointer;
gap: var(--space-1);
text-align: left;
grid-template-columns: minmax(0, 1fr) auto;
}
.magic-todo-list-item__content > svg {
grid-column: 2;
grid-row: 1 / 3;
align-self: center;
color: var(--text-muted);
}
.magic-todo-list-item--completed strong {
text-decoration: line-through;
color: var(--text-muted);
}
.magic-todo-toolbar {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: var(--space-3);
}
.magic-notes-overview--todos {
overflow: hidden;
}
.magic-notes-overview--todos .magic-notes-library-panel {
flex: 1;
}
.magic-notes-overview--todos .magic-notes-pane-heading,
.magic-todo-toolbar {
flex: 0 0 auto;
}
.magic-todo-toolbar .magic-notes-search {
flex: 1 1 240px;
min-width: 0;
}
.magic-todo-task {
min-width: 0;
border-bottom: 1px solid var(--border-subtle);
}
.magic-todo-task:has([aria-expanded='true']) {
border-radius: var(--radius-control);
background: var(--surface-subtle);
}
.magic-todo-workspace {
display: grid;
flex: 1;
min-height: 0;
min-width: 0;
grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
overflow: hidden;
}
.magic-todo-workspace > .magic-notes-list {
padding-right: var(--space-3);
}
.magic-todo-detail {
display: grid;
min-width: 0;
min-height: 0;
overflow: auto;
align-content: start;
border-left: 1px solid var(--border-subtle);
padding: var(--space-3) var(--space-4) var(--space-4);
gap: var(--space-4);
}
#magic-todo-back {
display: none;
}
@container magic-notes-page (max-width: 700px) {
.magic-todo-workspace {
grid-template-columns: minmax(0, 1fr);
}
.magic-todo-workspace--selected > .magic-notes-list,
.magic-todo-detail--empty {
display: none;
}
.magic-todo-detail {
border-left: 0;
padding: var(--space-3) 0;
}
#magic-todo-back {
display: inline-flex;
}
}
.magic-todo-detail h3,
.magic-todo-instructions {
margin: 0;
font-size: var(--font-body);
overflow-wrap: anywhere;
white-space: pre-wrap;
}
.magic-todo-detail > button {
justify-self: start;
}
.magic-todo-comments {
display: grid;
min-width: 0;
gap: var(--space-2);
}
.magic-todo-comments .magic-notes-ai-controls {
display: flex;
align-items: end;
flex-wrap: wrap;
}
.magic-todo-comments .magic-notes-ai-controls > small {
flex-basis: 100%;
}
.magic-todo-list-item__content strong {
@@ -1687,25 +1774,30 @@
.magic-note-list-item {
display: grid;
width: 100%;
padding: var(--space-3);
border: 1px solid transparent;
border-radius: var(--radius-control);
background: transparent;
height: 100%;
min-height: 160px;
padding: var(--space-4);
border: 1px solid var(--border-default);
border-radius: var(--radius-card);
background: var(--surface-raised);
color: var(--text-secondary);
cursor: pointer;
gap: var(--space-1);
gap: var(--space-3);
grid-template-rows: auto 1fr auto;
text-align: left;
}
.magic-notes-card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
align-content: start;
gap: var(--space-4);
}
.magic-note-list-item:hover {
background: var(--surface-muted);
}
.magic-note-list-item--active {
border-color: var(--accent-selected);
background: var(--accent-subtle);
}
.magic-note-list-item__title {
display: flex;
overflow: hidden;
@@ -1760,127 +1852,6 @@
gap: var(--space-3);
}
.magic-todo-detail {
display: flex;
min-height: 100%;
flex-direction: column;
gap: var(--space-4);
}
.magic-todo-detail > header {
display: grid;
min-width: 0;
align-items: start;
padding-bottom: var(--space-3);
border-bottom: 1px solid var(--border-subtle);
gap: var(--space-3);
grid-template-columns: auto minmax(0, 1fr) auto;
}
.magic-todo-detail__check {
display: grid;
width: 36px;
height: 36px;
padding: 0;
border: 0;
border-radius: var(--radius-control);
background: var(--accent-subtle);
color: var(--accent);
cursor: pointer;
place-items: center;
}
.magic-todo-detail__check:hover {
background: var(--accent-selected);
}
.magic-todo-detail > header > div:nth-child(2) {
display: grid;
min-width: 0;
gap: var(--space-1);
}
.magic-todo-detail > header span {
color: var(--text-muted);
font-size: var(--font-caption);
}
.magic-todo-detail h2 {
margin: 0;
color: var(--text-primary);
font-size: 18px;
line-height: 1.35;
overflow-wrap: anywhere;
}
.magic-todo-detail__actions {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: var(--space-2);
}
.magic-todo-detail__actions button,
.magic-todo-detail__content .secondary-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-1);
}
.magic-todo-detail__content {
display: grid;
align-content: start;
padding: var(--space-4);
border: 1px solid var(--border-default);
border-radius: var(--radius-card);
background: var(--surface-subtle);
gap: var(--space-4);
}
.magic-todo-detail__content p {
margin: 0;
color: var(--text-primary);
font-size: 14px;
line-height: 1.7;
overflow-wrap: anywhere;
white-space: pre-wrap;
}
.magic-todo-detail__content .secondary-button {
width: fit-content;
}
.magic-todo-detail__editor {
display: grid;
gap: var(--space-4);
}
.magic-todo-detail__editor label {
display: grid;
color: var(--text-secondary);
font-size: var(--font-body);
gap: var(--space-2);
}
.magic-todo-detail__editor input,
.magic-todo-detail__editor textarea {
width: 100%;
padding: var(--space-2) var(--space-3);
border: 1px solid var(--border-control);
border-radius: var(--radius-control);
background: var(--surface-raised);
color: var(--text-primary);
resize: vertical;
}
.magic-todo-detail__editor > div {
display: flex;
justify-content: flex-end;
gap: var(--space-2);
}
.magic-notes-ai-source {
color: var(--text-muted);
font-size: var(--font-caption);
@@ -2263,14 +2234,13 @@
@container magic-notes-page (max-width: 800px) {
.magic-notes-layout {
grid-template-columns:
var(--magic-notes-list-width, 210px) 9px
minmax(320px, 1fr);
grid-template-rows: minmax(0, 1fr) auto;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: minmax(0, 1fr) minmax(0, min(40%, 280px));
}
.magic-notes-layout--list-hidden {
grid-template-columns: minmax(320px, 1fr);
.magic-notes-layout--overview,
.magic-notes-layout--ai-hidden {
grid-template-rows: minmax(0, 1fr);
}
.magic-notes-ai-resize-handle {
@@ -2286,28 +2256,6 @@
}
@container magic-notes-page (max-width: 720px) {
.magic-notes-layout {
min-height: 0;
overflow: visible;
grid-template-columns: 1fr;
grid-template-rows: auto auto auto;
}
.magic-notes-list-resize-handle {
display: none;
}
.magic-notes-list-pane {
max-height: 240px;
border-right: 0;
border-bottom: 1px solid var(--border-subtle);
}
.magic-notes-ai-pane {
max-height: none;
grid-column: auto;
}
.magic-note-composer > footer,
.magic-note-entry > header {
align-items: stretch;
@@ -2320,15 +2268,6 @@
flex-direction: column;
}
.magic-todo-detail > header {
grid-template-columns: auto minmax(0, 1fr);
}
.magic-todo-detail__actions {
justify-content: flex-start;
grid-column: 1 / -1;
}
}
* {