feat(web/ui): consolidate dialogs, cards, and breakpoints (Pass 3)

- Unify modal/dialog system; .modal-* are now aliases of .dialog-*
- Migrate WorkspacesPage, start-tool-modal, merge-dialog, workspace-tools-panel to .dialog-*
- Add .card-sm/.card-md/.card-lg/.card-elevated/.card-borderless modifiers
- Apply card utilities across workspaces, projects, ssh-keys, workspace-detail, git-history
- Remove duplicated card-like background/border/padding from page CSS
- Remove 860px breakpoint; standardize on 767px/768px mobile split
- Add docs/development/ui-review-checklist.md
- Archive web-ui-spacing-typography-rework OpenSpec change
This commit is contained in:
Developer
2026-06-16 15:27:45 +00:00
parent 4f4939406f
commit 6e419f815d
25 changed files with 752 additions and 202 deletions
+131 -134
View File
@@ -255,8 +255,27 @@
.card {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
padding: 1rem;
border-radius: var(--radius-md);
}
.card-sm {
padding: var(--space-3);
}
.card-md {
padding: var(--space-4);
}
.card-lg {
padding: var(--space-5);
}
.card-elevated {
box-shadow: var(--shadow-sm);
}
.card-borderless {
border-color: transparent;
}
.card-label {
@@ -387,40 +406,129 @@
margin: 0;
}
/* ─── Dialog / Modal System ───
* .dialog-* is the canonical implementation.
* .modal-overlay and .modal-content are deprecated aliases kept for backward compatibility.
*/
.dialog-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.35);
display: grid;
place-content: center;
z-index: 50;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-4);
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(2px);
}
.modal-overlay {
/* deprecated alias */
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: var(--space-4);
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(2px);
}
.dialog {
width: 100%;
max-width: 32rem;
max-height: calc(100vh - var(--space-8));
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
padding: var(--space-5);
width: min(560px, 100vw - 2rem);
max-height: min(800px, 100vh - 2rem);
overflow-y: auto;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
}
.modal-content {
/* deprecated alias */
width: 100%;
max-width: 32rem;
max-height: calc(100vh - var(--space-8));
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
}
.dialog-lg {
width: min(800px, 100vw - 2rem);
max-width: 48rem;
}
.dialog-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
padding: var(--space-4);
border-bottom: 1px solid var(--border);
}
.dialog-header h2,
.dialog-header h3 {
margin: 0;
font-size: var(--font-size-lg);
line-height: var(--line-height-tight);
}
.dialog-body {
flex: 1;
overflow: auto;
padding: var(--space-4);
}
.dialog-footer,
.dialog-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: var(--space-3);
padding: var(--space-4);
border-top: 1px solid var(--border);
}
.dialog-close {
display: flex;
align-items: center;
justify-content: center;
width: var(--touch-target);
height: var(--touch-target);
padding: 0;
background: transparent;
border: none;
border-radius: var(--radius-md);
color: var(--muted);
cursor: pointer;
}
.dialog-close:hover {
background: var(--bg);
color: var(--ink);
}
@media (max-width: 767px) {
.dialog {
width: 100vw;
height: 100vh;
max-height: 100vh;
border-radius: 0;
padding: var(--space-4);
.dialog-overlay,
.modal-overlay {
align-items: flex-end;
padding: 0;
}
.dialog-overlay {
padding: 0;
.dialog,
.modal-content {
max-width: 100%;
max-height: calc(100vh - var(--space-6));
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
}
@@ -551,18 +659,8 @@
border-radius: 10px;
}
@media (max-width: 860px) {
.shell-body {
grid-template-columns: 1fr;
}
.shell-nav {
flex-direction: row;
overflow-x: auto;
border-right: 0;
border-bottom: 1px solid var(--border);
}
/* The 860px breakpoint is deprecated; mobile layout is handled at 767px above. */
@media (max-width: 767px) {
.card-grid {
grid-template-columns: 1fr;
}
@@ -641,43 +739,6 @@
font-size: 0.85rem;
}
/* Modal Styles */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1.5rem;
min-width: 400px;
max-width: 600px;
max-height: 80vh;
overflow: auto;
}
.modal-content h2 {
margin: 0 0 1rem 0;
font-size: 1.25rem;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
margin-top: 1.5rem;
}
/* Merge Dialog */
.merge-form {
display: flex;
@@ -776,7 +837,7 @@
}
/* Mobile responsiveness */
@media (max-width: 768px) {
@media (max-width: 767px) {
.settings-layout {
flex-direction: column;
gap: 1rem;
@@ -879,65 +940,9 @@
}
/* Commit Dialog */
.dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
}
.commit-dialog {
background: var(--panel);
border-radius: 14px;
width: 100%;
max-width: 600px;
max-height: 90vh;
overflow: auto;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.dialog-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border);
}
.dialog-header h3 {
margin: 0;
font-size: 1.1rem;
}
.dialog-close {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--muted);
padding: 0;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
}
.dialog-close:hover {
background: var(--bg);
color: var(--ink);
}
.dialog-body {
padding: 1.5rem;
}
.file-info {
@@ -1012,14 +1017,6 @@
margin-bottom: 1rem;
}
.dialog-footer {
display: flex;
justify-content: flex-end;
gap: 0.75rem;
padding: 1rem 1.5rem;
border-top: 1px solid var(--border);
}
/* Icon System */
.icon {
display: inline-flex;
+19 -11
View File
@@ -8,7 +8,7 @@
.branch-selector {
padding: 0.45rem 0.7rem;
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
font: inherit;
background: var(--panel);
color: var(--ink);
@@ -37,13 +37,17 @@
display: flex;
gap: 0.75rem;
padding: 0.75rem;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
cursor: pointer;
transition: background-color 0.15s ease;
}
.commit-item,
.commit-item.card-sm {
background: var(--panel);
border: 1px solid var(--border);
}
.commit-item:hover {
background: #ece7df;
}
@@ -84,7 +88,7 @@
color: var(--brand);
background: #f0f7f4;
padding: 0.15rem 0.4rem;
border-radius: 6px;
border-radius: var(--radius-sm);
}
.commit-refs {
@@ -117,14 +121,18 @@
}
.commit-detail-panel {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
border-radius: var(--radius-lg);
padding: 1.25rem;
overflow-y: auto;
max-height: 70vh;
}
.commit-detail-panel,
.commit-detail-panel.card-lg {
background: var(--panel);
border: 1px solid var(--border);
}
.detail-header {
display: flex;
justify-content: space-between;
@@ -183,7 +191,7 @@
align-items: center;
padding: 0.75rem;
background: #f5f3ee;
border-radius: 10px;
border-radius: var(--radius-md);
}
.stat.additions {
@@ -224,7 +232,7 @@
font-size: 0.85rem;
padding: 0.2rem 0.5rem;
background: #f5f3ee;
border-radius: 6px;
border-radius: var(--radius-sm);
}
.diff-content {
@@ -233,7 +241,7 @@
line-height: 1.5;
background: #f5f3ee;
padding: 0.75rem;
border-radius: 10px;
border-radius: var(--radius-md);
overflow-x: auto;
white-space: pre-wrap;
word-break: break-all;
+12 -4
View File
@@ -18,7 +18,7 @@
color: inherit;
cursor: pointer;
padding: var(--space-2);
border-radius: 10px;
border-radius: var(--radius-md);
flex: 1;
}
@@ -57,8 +57,12 @@
gap: var(--space-3);
padding: var(--space-4);
background: var(--bg);
border-radius: var(--radius-md);
}
.repo-block,
.repo-block.card-md {
border: 1px solid var(--border);
border-radius: 10px;
}
.repo-header {
@@ -85,10 +89,14 @@
flex-direction: column;
gap: var(--space-1);
padding: var(--space-3);
font-size: var(--font-size-sm);
border-radius: var(--radius-md);
}
.workspace-chip,
.workspace-chip.card-sm {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
font-size: var(--font-size-sm);
}
.workspace-chip a {
+1 -2
View File
@@ -11,8 +11,7 @@
gap: var(--space-2);
padding: var(--space-4);
background: var(--bg);
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
}
@media (min-width: 768px) {
+40 -12
View File
@@ -144,11 +144,15 @@
gap: var(--space-3);
padding: var(--space-3);
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
flex-wrap: wrap;
}
.git-toolbar,
.git-toolbar.card-md {
border: 1px solid var(--border);
}
.git-toolbar-status {
display: flex;
gap: var(--space-2);
@@ -209,12 +213,16 @@
.file-tree {
overflow-y: auto;
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
padding: var(--space-3);
background: var(--panel);
}
.file-tree,
.file-tree.card-md {
border: 1px solid var(--border);
}
.tree-entry {
display: flex;
align-items: center;
@@ -244,12 +252,16 @@
.file-viewer {
display: flex;
flex-direction: column;
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
background: var(--panel);
overflow: hidden;
}
.file-viewer,
.file-viewer.card-md {
border: 1px solid var(--border);
}
.file-viewer-header {
display: flex;
justify-content: space-between;
@@ -324,12 +336,16 @@
gap: var(--space-3);
padding: var(--space-3);
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
border-radius: var(--radius-md);
align-items: center;
font-size: var(--font-size-sm);
}
.commit-row,
.commit-row.card-sm {
border: 1px solid var(--border);
}
.commit-hash {
font-family: monospace;
color: var(--brand);
@@ -360,10 +376,14 @@
align-items: center;
gap: var(--space-3);
padding: var(--space-10);
border-radius: var(--radius-lg);
text-align: center;
}
.empty-state-card,
.empty-state-card.card-lg {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
text-align: center;
}
.empty-state-card h3 {
@@ -386,9 +406,13 @@
flex-direction: column;
gap: var(--space-3);
padding: var(--space-4);
border-radius: var(--radius-lg);
}
.instance-card,
.instance-card.card-md {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
}
.instance-card.running {
@@ -405,9 +429,13 @@
flex-direction: column;
gap: var(--space-4);
padding: var(--space-5);
border-radius: var(--radius-lg);
}
.settings-section,
.settings-section.card-lg {
background: var(--panel);
border: 1px solid var(--border);
border-radius: 14px;
}
.settings-section h3 {
+13 -13
View File
@@ -18,14 +18,19 @@
flex-direction: column;
gap: var(--space-4);
padding: var(--space-5);
border: 1px solid var(--border);
border-radius: 12px;
background: var(--panel);
transition:
box-shadow 0.15s ease,
border-color 0.15s ease;
}
.workspace-card,
.workspace-card.card-lg {
/* Uses global .card as base; explicit here if class not added to markup */
background: var(--panel);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
}
.workspace-card:hover {
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
border-color: color-mix(in srgb, var(--border) 80%, var(--brand));
@@ -186,29 +191,23 @@
margin-right: auto;
}
/* Status badges */
.status-badge {
flex-shrink: 0;
font-size: var(--font-size-xs);
font-weight: 600;
padding: var(--space-1) var(--space-2);
border-radius: 999px;
text-transform: capitalize;
}
/* Status badges — use global .status-badge */
.status-ready {
background: var(--success-light);
color: var(--success);
border-color: color-mix(in srgb, var(--success) 30%, transparent);
}
.status-syncing {
background: var(--warning-light);
color: var(--warning);
border-color: color-mix(in srgb, var(--warning) 30%, transparent);
}
.status-error {
background: var(--danger-light);
color: var(--danger);
border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}
/* Empty state */
@@ -236,6 +235,7 @@
.workspace-card {
padding: var(--space-4);
gap: var(--space-3);
border-radius: var(--radius-md);
}
.workspace-actions {