Skip to content

feat: add Ketch design system for Compose Multiplatform#136

Open
linroid wants to merge 3 commits intomainfrom
feature/new_design
Open

feat: add Ketch design system for Compose Multiplatform#136
linroid wants to merge 3 commits intomainfrom
feature/new_design

Conversation

@linroid
Copy link
Copy Markdown
Owner

@linroid linroid commented May 6, 2026

Summary

  • Ports the Ketch.html design package into a Compose Multiplatform design system in app/shared.
  • Adds theme tokens (Colors, Typography, Shapes, Spacing, Elevation, Motion) and a KetchTheme composable that extends Material 3.
  • Adds an icon set (KetchIcon enum, ~28 glyphs, PathParser-rendered) and core components: KetchButton/KetchIconButton, KetchTextField, KetchCard, KetchBadge, KetchProgressBar, KetchSidebarItem, plus the signature download primitives KetchSegmentBar, KetchSegmentDetail, KetchSpeedChart, KetchDownloadRow.
  • Existing app composables are not yet rewired to the new components — that lands in a follow-up.

Test plan

  • ./gradlew :app:shared:compileKotlinJvm
  • ./gradlew :app:shared:compileKotlinIosSimulatorArm64
  • ./gradlew :app:shared:compileKotlinWasmJs
  • ./gradlew :app:shared:compileAndroidMain
  • Visual smoke test once components are wired into screens

Ports the design system from the Ketch.html design package into the shared
module: theme tokens (colors, typography, shapes, spacing, elevation, motion)
plus icon set and core components (Button, IconButton, TextField, Card, Badge,
ProgressBar, SidebarItem, SegmentBar, SegmentDetail, SpeedChart, DownloadRow).

Compiles for Android, JVM, iOS-Simulator-Arm64, and WasmJs.
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

extraSmall = xs as androidx.compose.foundation.shape.CornerBasedShape,
small = sm as androidx.compose.foundation.shape.CornerBasedShape,

P2 Badge Remove unsafe shape casts in Material shape mapping

toMaterialShapes() force-casts every KetchShapes entry from Shape to CornerBasedShape, so any caller that provides a non-corner shape (for example RectangleShape in a custom theme override) will hit a ClassCastException at runtime when KetchTheme composes. Since KetchShapes is a public data class typed as Shape, this is a real crash path for valid-looking API usage; either constrain KetchShapes fields to CornerBasedShape or perform safe conversion/fallback before building Shapes.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Replaces Material 3 primitives across the shared UI with KetchButton,
KetchIconButton, KetchSidebarItem, KetchProgressBar, KetchBadge,
KetchCard, and KetchIconImage so screens render in the design system's
visual language (3dp accent rail on selected sidebar items, monospaced
mono-styled metadata, neutral-tinted icon buttons).

Touched: AppShell, SidebarNavigation, SpeedStatusBar, BatchActionBar,
DownloadList + DownloadListItem + ProgressSection + TaskActionButtons,
PriorityBadge, StatusIndicator, AddRemoteServerDialog, AddDownloadDialog,
AiDiscoverDialog, EmbeddedServerControls.

Compiles clean for Android, JVM, iOS-Simulator-Arm64, and WasmJs.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test Results

1 043 tests  ±0   1 043 ✅ ±0   14s ⏱️ -1s
   94 suites ±0       0 💤 ±0 
   94 files   ±0       0 ❌ ±0 

Results for commit b2ba964. ± Comparison against base commit f6e19f4.

♻️ This comment has been updated with latest results.

Restructures the desktop shell to match the design exploration:

- DownloadListItem: chip + name + thin progress + mono metric + status pill +
  contextual action, all on one 56dp row. Click expands.
- DownloadExpandedPanel: per-segment progress (KetchSegmentDetail driven by
  DownloadTask.segments), 30-sample speed sparkline (KetchSpeedChart), and
  metadata grid (URL, priority, destination, error).
- KetchToolbar: title + bandwidth readout (live MB/s with cap meter) +
  search hint pill (⌘K) + AI button + batch actions + primary Add Download.
  Wired in for expanded layouts; TopAppBar still used on compact/medium.
- SidebarNavigation: Ketch wordmark header with macOS traffic-light insets
  + clickable connection pill (local/remote, hostname, status dot) →
  instance selector. New Task moves to the toolbar to mirror the design.
- KetchFileTypeChip: small accent-tinted file-extension tile.

Compiles clean for Android, JVM, iOS-Simulator-Arm64, WasmJs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant