Skip to content

Clarify applet success colors across workspace themes - #79

Open
tonyfresher wants to merge 29 commits into
mainfrom
tinkering/applet-success-color-guidance
Open

Clarify applet success colors across workspace themes#79
tonyfresher wants to merge 29 commits into
mainfrom
tinkering/applet-success-color-guidance

Conversation

@tonyfresher

Copy link
Copy Markdown
Collaborator

Summary

  • Add clear success-color guidance for applets and workspace themes.
  • Update theme tokens, runtime handling, customization UI, and shared panel components.
  • Refresh workspace design guidance and scaffold/build behavior.
  • Expand coverage for theme, layout, skill-template, API, and applet build behavior.

Testing

Not run (not requested).

@tonyfresher
tonyfresher requested a review from molefrog August 5, 2026 10:59
Reorder workspace panel layout to place the header below content using flex-col-reverse, and update PanelHeader styling from bottom border to ring style with relative positioning.
Wrap the stop-agent button in a Tooltip and switch to the filled stop icon for clearer affordance. Updated imports to include Tooltip, TooltipTrigger, and TooltipContent and replaced IconPlayerStop with IconPlayerStopFilled. No functional changes — just UI/UX and accessibility improvements (tooltip text: "Stop answering").
Fix a typo in client/runtime/workspace-theme.ts by renaming FONT_LINK_ID and FONT_PREVIEW_LINK_ID from 'mei-...' to 'moi-...'. This aligns the DOM IDs with the project name and prevents incorrect/missing font link handling for font loading and previews.
@tonyfresher
tonyfresher force-pushed the tinkering/applet-success-color-guidance branch from 4e5ff84 to bee07b6 Compare August 5, 2026 14:31
Comment thread workspace/.claude/skills/moi-workspace/SKILL.md
Comment thread server/test/skills-template.test.ts Outdated
Comment thread lib/themes.ts
}

export const RADIUS_THEMES: Record<RadiusTheme, RadiusThemeConfig> = {
squishy: { label: 'Squishy', radius: '0.875rem' },

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude in theory, is it possible to apply border-shape to all rounded elemnts in an applet when this option is selected? just curious

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and cheaper than it sounds. The trick is that corner-shape is a no-op when the corner radius is 0, so you never need to select "elements that are rounded" — a blanket rule is safe. WidgetFrame already relies on this: it hardcodes [corner-shape:superellipse(1.2)] and still comes out square under the Square preset.

So it's one variable riding along with --radius:

// lib/themes.ts
squishy: { label: 'Squishy', radius: '0.875rem', cornerShape: 'superellipse(1.2)' },
soft:    { label: 'Soft',    radius: '0.625rem', cornerShape: 'round' },

getWorkspaceThemeStyle writes --corner-shape next to --radius, and theme.css (already inlined into every applet bundle by build-applet.ts) carries the rule — corner-shape doesn't inherit, hence *:

@layer base {
  *, *::before, *::after { corner-shape: var(--corner-shape, round); }
}

Applets then pick it up with no skill-guidance change, same path as --radius today.

Two things to weigh before doing it:

  • Circles become squircles. rounded-full avatars, dots, spinners, and pills all get squished. That's the one visible failure mode, and it's not filterable by selector — a 50% radius is indistinguishable from any other in CSS. Options are to accept it as part of "Squishy", or to have the skill guidance pair rounded-full with an explicit [corner-shape:round].
  • Engine support. corner-shape is Chromium-led; engines without it just render ordinary rounded corners, so the fallback is graceful but the preset looks different per browser.

Happy to wire it up if you want it — it's a small diff, mostly the circle question.


Generated by Claude Code

Comment thread client/features/widgets/WidgetGrid.tsx Outdated
items: GridItem[]
editing?: boolean
renderItem: (id: string) => ReactNode
theme?: WorkspaceLayout['theme']

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude would it make thing easier if theme was in some per-workspace context? just saves us some unnecessary prop drilling

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes — and it already is: WorkspaceLayoutContext carries layout.theme, so the prop hops were pure drilling. WidgetFrame now reads the theme itself and the prop is gone from WidgetGrid, HiddenPanel, and both call sites in Widgets.tsx.

Added useWorkspaceThemeSetting() next to useWorkspaceLayoutCtx() rather than reusing it directly: it returns undefined outside a provider instead of throwing, which is the same contract the optional prop had, so WidgetFrame still renders standalone in WidgetFrame.test.tsx without standing up a query client.

Pushed to claude/address-comments-f8k0y2 (this session's branch, not the PR head).


Generated by Claude Code

@molefrog molefrog left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, gonna spin up claude in cloud to address things I've highlighted

WidgetFrame now pulls the theme from WorkspaceLayoutContext instead of
having it threaded through WidgetGrid and HiddenPanel. The layout context
already carries it, so the prop hops were pure drilling.

Also cut the skills-template test down to what it actually verifies:
bundled files land verbatim over a stale copy, unrelated workspace files
survive. Asserting the shipped DESIGN.md/SKILL.md prose made the test a
copy of the source tree that had to be edited on every guidance change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FjhYF8LDhG2HaKAHFueLfd
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.

3 participants