Skip to content

fix: settings size and sidebar chat actions#1850

Merged
zerob13 merged 5 commits into
devfrom
codex/project-health-audit
Jun 30, 2026
Merged

fix: settings size and sidebar chat actions#1850
zerob13 merged 5 commits into
devfrom
codex/project-health-audit

Conversation

@zerob13

@zerob13 zerob13 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add minimum Settings window bounds to prevent overflow
  • remove dead code and obsolete example code from the audit follow-up
  • update sidebar Chat and Project folder rows with workspace-aware new-chat actions

Tests

  • pnpm vitest run test/renderer/components/WindowSideBar.test.ts
  • pnpm run format
  • pnpm run i18n
  • pnpm run lint
  • pnpm run typecheck

Summary by CodeRabbit

  • New Features
    • Added one-click “new chat” actions from the sidebar chat header and from eligible project folder rows (behavior varies by grouping mode).
  • Bug Fixes
    • Improved Settings window sizing with minimum width/height to prevent horizontal overflow.
    • Refined sidebar hover/focus styling and click handling for chat/project row actions.
  • Documentation
    • Added/updated architecture and UI behavior specifications for upcoming cleanup and sidebar interactions.
  • Tests
    • Expanded sidebar and window sizing coverage, including project-scoped “new chat” flows.
  • Chores
    • Removed confirmed dead code and a deprecated page capture example; standardized provider DB fetching by removing the previous override mechanism from CI/build and related runtime configuration.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d9a18d27-0665-43b2-8f8d-aeb27e59e0bb

📥 Commits

Reviewing files that changed from the base of the PR and between b72ea08 and 047f865.

📒 Files selected for processing (10)
  • .github/workflows/build.yml
  • .github/workflows/prcheck.yml
  • .github/workflows/release.yml
  • .github/workflows/windows-arm64-e2e.yml
  • docs/architecture/provider-db-github-source/spec.md
  • scripts/fetch-provider-db.mjs
  • src/main/env.d.ts
  • src/main/presenter/configPresenter/providerDbLoader.ts
  • src/renderer/src/env.d.ts
  • test/main/presenter/configPresenter/providerDbLoader.test.ts
💤 Files with no reviewable changes (7)
  • src/main/presenter/configPresenter/providerDbLoader.ts
  • .github/workflows/prcheck.yml
  • src/renderer/src/env.d.ts
  • .github/workflows/windows-arm64-e2e.yml
  • src/main/env.d.ts
  • .github/workflows/release.yml
  • .github/workflows/build.yml
✅ Files skipped from review due to trivial changes (1)
  • docs/architecture/provider-db-github-source/spec.md

📝 Walkthrough

Walkthrough

The PR removes two dead-code files, updates the sidebar Chat section and project folder rows to add new-chat actions, enforces minimum dimensions for the Settings window, and switches provider DB sourcing away from the CDN override path.

Changes

Dead Code Removal

Layer / File(s) Summary
Remove dead-code files
docs/architecture/dead-code-cleanup-2026-06/spec.md, src/renderer/src/composables/usePageCapture.example.ts
Adds a cleanup spec and deletes the deprecated directory reader export plus the page-capture example module.

Sidebar Chat Section New-Chat Actions

Layer / File(s) Summary
Sidebar new-chat actions spec
docs/features/sidebar-chat-section-actions/spec.md
Defines the Chat and project-folder sidebar interaction changes, hover coverage, click behavior, and grouping rules for the plus actions.
WindowSideBar UI and handler
src/renderer/src/components/WindowSideBar.vue
Splits the chat header into collapse and new-chat controls, adds a conditional project-folder plus button, removes CHAT_SECTION_ICON, adds handleNewChatForProject(projectPath), and updates row focus styling.
WindowSideBar tests and mock setup
test/renderer/components/WindowSideBar.test.ts, test/setup.ts
Expands the sidebar test mocks and updates interaction coverage for the chat header and project-folder new-chat actions across project and time grouping modes.

Settings Window Minimum Size

Layer / File(s) Summary
Settings BrowserWindow min size implementation and test
docs/issues/settings-window-overflow/spec.md, src/main/presenter/windowPresenter/index.ts, test/main/presenter/windowPresenter.test.ts
Documents the overflow issue, adds minWidth: 900 and minHeight: 640 to the Settings BrowserWindow, and asserts those options in a new test.

Provider DB GitHub Source Update

Layer / File(s) Summary
Provider DB source spec
docs/architecture/provider-db-github-source/spec.md
Describes the provider DB URL change plan, acceptance criteria, and non-goals around removing the CDN override path.
Workflow env updates
.github/workflows/build.yml, .github/workflows/prcheck.yml, .github/workflows/release.yml, .github/workflows/windows-arm64-e2e.yml
Removes VITE_PROVIDER_DB_URL from build, PR check, release, and Windows arm64 workflow environment blocks, and replaces release OAuth env values with DC_GITHUB_* secrets.
Runtime and build URL selection
scripts/fetch-provider-db.mjs, src/main/env.d.ts, src/main/presenter/configPresenter/providerDbLoader.ts, src/renderer/src/env.d.ts, test/main/presenter/configPresenter/providerDbLoader.test.ts
Removes environment-based provider DB URL overrides from the fetch script and from ProviderDbLoader, drops the corresponding ImportMetaEnv declaration, and updates tests for the default URL path.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant WindowSideBar
  participant projectStore
  participant router
  participant sessionStore
  User->>WindowSideBar: click plus button
  WindowSideBar->>projectStore: selectProject(path, 'manual')
  WindowSideBar->>router: push({ name: 'chat' })
  WindowSideBar->>sessionStore: startNewConversation({ refresh: true })
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

  • ThinkInAIXYZ/deepchat#981: Removes the VITE_PROVIDER_DB_URL override path in ProviderDbLoader and related typings, which matches the provider DB source update here.

Suggested labels

enhancement

🐇 I hopped through code and found,
Old dead paths now lay on the ground.
A sidebar + now glows so bright,
Settings fit and feel just right—
And GitHub URLs lead the way around.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and captures two primary user-facing changes: the settings window size fix and sidebar chat action updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/project-health-audit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/renderer/src/components/WindowSideBar.vue`:
- Around line 1303-1307: The issue is that handleNewChatForProject calls
projectStore.selectProject without waiting for it to finish, so the project
context may not be set before handleNewChat runs. Update handleNewChatForProject
in WindowSideBar.vue to await projectStore.selectProject(projectPath, 'manual')
before invoking handleNewChat, matching the async handling used by other store
actions in this component.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a9b823d-b06d-48e5-99f7-55daa79342dc

📥 Commits

Reviewing files that changed from the base of the PR and between 050d014 and 76aac9c.

📒 Files selected for processing (16)
  • docs/architecture/dead-code-cleanup-2026-06/plan.md
  • docs/architecture/dead-code-cleanup-2026-06/spec.md
  • docs/architecture/dead-code-cleanup-2026-06/tasks.md
  • docs/features/sidebar-chat-section-actions/plan.md
  • docs/features/sidebar-chat-section-actions/spec.md
  • docs/features/sidebar-chat-section-actions/tasks.md
  • docs/issues/settings-window-overflow/plan.md
  • docs/issues/settings-window-overflow/spec.md
  • docs/issues/settings-window-overflow/tasks.md
  • src/main/presenter/windowPresenter/index.ts
  • src/main/presenter/workspacePresenter/directoryReader.ts
  • src/renderer/src/components/WindowSideBar.vue
  • src/renderer/src/composables/usePageCapture.example.ts
  • test/main/presenter/windowPresenter.test.ts
  • test/renderer/components/WindowSideBar.test.ts
  • test/setup.ts
💤 Files with no reviewable changes (2)
  • src/renderer/src/composables/usePageCapture.example.ts
  • src/main/presenter/workspacePresenter/directoryReader.ts

Comment thread src/renderer/src/components/WindowSideBar.vue
@zerob13 zerob13 changed the title Fix settings size and sidebar chat actions fix: settings size and sidebar chat actions Jun 30, 2026
@zerob13 zerob13 merged commit 810fe69 into dev Jun 30, 2026
1 check passed
@zhangmo8 zhangmo8 deleted the codex/project-health-audit branch June 30, 2026 08:14
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