Commit Graph

28 Commits

Author SHA1 Message Date
SlayTheDragons
cbf247a4ef feat (frontend): Text size accessibility settings (As requested in issue #1482) (#1624)
<img width="496" height="470" alt="Screenshot 2025-10-24 200100"
src="https://github.com/user-attachments/assets/e64ee081-dc08-4b54-94a6-9ed41453cfcf"
/>

This PR adds settings for text size, small, medium (default), large and
extra large.

This should help more people use Dyad more productively.

Closes #1482 
    






<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Adds adjustable workspace zoom levels (90%, 100%, 110%, 125%, 150%) to
improve readability and accessibility. Changes apply instantly and
persist per user, addressing issue #1482.

- **New Features**
  - Zoom selector in Settings → General.
  - Persists zoomLevel in user settings and schema.
  - Applies zoom via Electron webFrame for consistent app scaling.

- **Refactors**
  - Removed deprecated workspaceTextSize setting.
  - Removed root font-size from globals.css.

<sup>Written for commit 54bad25f016a83e9f414025a07e80fdbad859366.
Summary will update automatically on new commits.</sup>

<!-- End of auto-generated description by cubic. -->








<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds adjustable app zoom levels (90–150%) with a Settings selector,
persisted in user settings, and applied via Electron webFrame.
> 
> - **UI/Settings**:
> - Add `ZoomSelector` component and surface it in `Settings → General`
(`src/components/ZoomSelector.tsx`, `src/pages/settings.tsx`).
> - **Schema/Persistence**:
> - Introduce `ZoomLevelSchema` and optional `zoomLevel` in
`UserSettingsSchema` (`src/lib/schemas.ts`).
> - **Electron Integration**:
> - Expose `webFrame.setZoomFactor/getZoomFactor` in `window.electron`
(`src/preload.ts`).
> - **App Behavior**:
> - Apply zoom factor on load and when settings change with default
`100%` (`src/app/layout.tsx`).
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
54bad25f016a83e9f414025a07e80fdbad859366. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Devforschool <138079274+Devforschool@users.noreply.github.com>
Co-authored-by: Will Chen <willchen90@gmail.com>
2025-11-10 15:49:25 -08:00
Will Chen
744e413e71 Support deep linking MCP (#1550)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds support for `dyad://add-mcp-server` deep links that prefill MCP
server settings, and updates deep link context/consumers to use
timestamp-based effects and clearing to avoid repeat handling.
> 
> - **Deep Link Infrastructure**:
> - Introduce `src/ipc/deep_link_data.ts` with zod schema
(`AddMcpServerConfigSchema`) and typed `DeepLinkData`.
> - Extend `DeepLinkContext` with `clearLastDeepLink`, timestamped
events, and auto-navigate to `/settings#tools-mcp` on `add-mcp-server`.
> - **Main Process**:
>   - Handle `dyad://add-mcp-server?name=...&config=...`:
> - Base64-decode and validate `config`; send `deep-link-received` with
typed payload or show error.
> - **Settings UI (MCP)**:
> - In `ToolsMcpSettings`, prefill form from `add-mcp-server` payload
(supports `stdio` command/args and `http` url) and show info toast;
clear deep link after handling.
> - **Connectors/UI**:
>   - Update `TitleBar`, `NeonConnector`, `SupabaseConnector` to:
> - Depend on `lastDeepLink?.timestamp` and call `clearLastDeepLink()`
after handling (`dyad-pro-return`, `neon-oauth-return`,
`supabase-oauth-return`).
> - **IPC Renderer**:
>   - Use centralized `DeepLinkData` types in `ipc_client.ts`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
294a9c6f38442241b54e9bcbe19a7a772d338ee0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-16 10:20:16 -07:00
Will Chen
4180b5b673 Reset scroll when navigating to provider (#1489)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Resets main content scroll to top when switching providers by adding a
container id and scrolling it on provider change.
> 
> - **Frontend**:
> - **Layout**: Add `id="layout-main-content-container"` to the main
content wrapper in `src/app/layout.tsx`.
> - **Provider Settings**: In `ProviderSettingsPage.tsx`, add an effect
to `scrollTo(0, 0)` on `#layout-main-content-container` when
`providerData` changes, resetting scroll on navigation.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
520758a3cf45f8438bc5089c3c427176eeefb306. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-09 13:30:28 -07:00
Will Chen
9691c9834b Support concurrent chats (#1478)
Fixes #212 


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Add concurrent chat support with per-chat state, chat activity UI, IPC
per-chat handling, and accompanying tests.
> 
> - **Frontend (Chat concurrency)**
> - Replace global chat atoms with per-chat maps:
`chatMessagesByIdAtom`, `isStreamingByIdAtom`, `chatErrorByIdAtom`,
`chatStreamCountByIdAtom`, `recentStreamChatIdsAtom`.
> - Update `ChatPanel`, `ChatInput`, `MessagesList`,
`DyadMarkdownParser`, and `useVersions` to read/write per-chat state.
> - Add `useSelectChat` to centralize selecting/navigating chats; wire
into `ChatList`.
> - **UI**
> - Add chat activity popover: `ChatActivityButton` and list; integrate
into `preview_panel/ActionHeader` (renamed from `PreviewHeader`) and
swap in `TitleBar`.
> - **IPC/Main**
> - Send error payloads with `chatId` on `chat:response:error`; update
`ipc_client` to route errors per chat.
> - Persist streaming partial assistant content periodically; improve
cancellation/end handling.
> - Make `FileUploadsState` per-chat (`addFileUpload({chatId,fileId},
...)`, `clear(chatId)`, `getFileUploadsForChat(chatId)`); update
handlers/processors accordingly.
> - **Testing**
> - Add e2e `concurrent_chat.spec.ts` and snapshots; extend helpers
(`snapshotMessages` timeout, chat activity helpers).
> - Fake LLM server: support `tc=` with options, optional sleep delay to
simulate concurrency.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
9035f30b73a1f2e5a366a0cac1c63411742b16f3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-09 10:51:01 -07:00
Will Chen
9cca1d2af0 Fix MCP & title bar (#1348)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Fixes MCP handoff by detecting an edit-code tool call and stopping
generation. Simplifies the title bar credit tooltip; also blocks dyad-*
tags in the system prompt and updates tests.

- **Bug Fixes**
- Stop generation on edit-code via hasToolCall; add a no-op edit-code
tool to signal handoff.
  - Combine tool-call stop with existing step limit for reliability.
  - Forbid <dyad-*> tags in the system prompt to prevent misuse.
- Remove credit usage/reset details from the title bar tooltip; keep the
delay note.
  - Update e2e snapshot to reflect the new prompt rule.

<!-- End of auto-generated description by cubic. -->
2025-09-22 15:50:18 -07:00
Will Chen
1e655e1c10 Use new dyad icons (#1157)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Updates app branding to icon set v2 and switches the in-app logo to SVG
for sharper rendering.

- **Refactors**
  - Use assets/logo.svg in TitleBar instead of logo_transparent.png.
- Add assets/logo.svg; remove legacy PNGs (logo.png,
logo_transparent.png).
- Refresh platform icon files (logo.icns, logo.ico,
assets/icon/logo.png).

<!-- End of auto-generated description by cubic. -->
2025-09-01 21:33:44 -07:00
Will Chen
3ce81e585a Intercept ctrl/command R for refresh (#759)
Fixes #209
2025-07-31 16:34:28 -07:00
Will Chen
444397ea86 Create Publish panel to easy GitHub and Vercel push (#655) 2025-07-17 15:54:08 -07:00
Will Chen
29065335f6 more draggable region for title bar (#651)
Fixes #650
2025-07-15 17:04:17 -07:00
Will Chen
9c5134b8da Polish beta 13 UX (#648) 2025-07-15 17:03:59 -07:00
Will Chen
be1321152e Make space for windows controls (#635) 2025-07-11 16:28:13 -07:00
Will Chen
2c284d0f20 Allow configuring environmental variables in panel (#626)
- [ ] Add test cases
2025-07-11 10:52:52 -07:00
Will Chen
4b84b12fe3 Extract panel header to title bar (#625) 2025-07-10 16:37:05 -07:00
Will Chen
9d1a0f7ad7 pro: show remaining credits (#329)
Fixes #265
2025-06-03 23:46:35 -07:00
Will Chen
647fd0169e make it easy to write multiple e2e tests (#280) 2025-05-29 00:03:51 -07:00
Will Chen
0d56651220 Run prettier on everything (#104) 2025-05-06 23:02:28 -07:00
Will Chen
a33e6c6ae3 Custom window controls (#46) 2025-04-29 11:41:40 -07:00
Will Chen
eda2f9206d Support deep link for Dyad Pro (#25) 2025-04-26 10:58:11 -07:00
Will Chen
4848b2f085 Add toggle for disabling Dyad Pro (#24)
* Add toggle for disabling Dyad Pro
* Entering key for Dyad pro enables dyad pro
2025-04-26 10:13:35 -07:00
Will Chen
2ad10ba039 Support LLM gateway with Dyad API key (#23)
* Do not make API key input (password) - hurts usability
* Support LLM gateway (and add GPT 4.1 mini model)
* Show Dyad Pro button
* Fix to use auto (not dyad) for detecting dyad pro
* Fix description of gpt 4.1-mini
2025-04-26 08:52:08 -07:00
Will Chen
0dcbb44e2b More spacing for header bar 2025-04-23 17:37:24 -07:00
Will Chen
5e29ffc2e2 ts ignore image imports 2025-04-23 12:59:09 -07:00
Will Chen
9828cb3db9 revamp title bar so it clicks to app details 2025-04-23 12:59:09 -07:00
Will Chen
42b759d85c Refresh UI when receiving deep link 2025-04-23 12:59:09 -07:00
Will Chen
e1911162e3 Use pnpm and more clean-up of sandbox mode 2025-04-17 17:33:09 -07:00
Will Chen
6a4f538879 Update setup/settings flow for runtime 2025-04-12 23:53:38 -07:00
Will Chen
d3c1f8e34c clear runtime consent and settings 2025-04-11 14:23:14 -07:00
Will Chen
43f67e0739 Initial open-source release 2025-04-11 09:38:16 -07:00