Skip to content

feat: add a desktop app (Electron + React) - #164

Open
Wengaiqiqi wants to merge 3 commits into
Done-0:mainfrom
Wengaiqiqi:desktop
Open

Wengaiqiqi wants to merge 3 commits into
Done-0:mainfrom
Wengaiqiqi:desktop

Conversation

@Wengaiqiqi

Copy link
Copy Markdown

Summary

Adds a desktop app for the analyzer under desktop/ (Electron + React, UI built with Astryx). It reuses the compiled core, so scores match the CLI exactly.

  • Pick or drag in a project folder; the overview shows the mess index, quality level, metric breakdown, categories and languages
  • Files view with a detail panel, and a paginated functions view
  • AI review of the worst files; results are saved per project and can be expanded or collapsed. Models can be fetched from the provider and picked from a list
  • Export reports (HTML / Markdown / JSON) and reviews (Markdown / HTML)
  • Recent projects reopen instantly from a cached report; remove them from a hover or right-click menu
  • Settings for language, theme, analysis and AI provider; the API key is encrypted with the OS keychain
  • English by default, with an EN / 中文 switch in the title bar (Settings also offers Traditional Chinese and Russian)

Also includes a fix in the OpenAI provider (src/ai/providers/openai.ts): reasoning models (o-series, gpt-5) reject max_tokens and non-default temperature / top_p. Requests now start with the classic parameters and adapt once when a 400 names the offending parameter; the working style is remembered per endpoint and model. Covered by new unit tests.

How to run

cd desktop
npm install
npm run dev        # development
npm run dist       # Windows installer (NSIS) in desktop/release

See desktop/README.md for details.

Checks

  • npm test: 210 tests pass
  • npx tsc --noEmit and npm run lint pass
  • Desktop renderer builds; the installer was built and tested on Windows 11

Reasoning models (o-series, gpt-5) reject max_tokens in favor of
max_completion_tokens and only accept the default temperature/top_p,
while many OpenAI-compatible services still expect the classic names.

Requests now start with the classic parameters and adapt once when a 400
names the offending parameter; the working style is remembered per
endpoint and model. An empty answer cut off by the token limit now
raises a clear error instead of returning an empty review.
A desktop front end for the analyzer in desktop/, reusing the compiled
core so scores match the CLI exactly.

- Pick or drop a project folder; overview with mess index, quality
  level, metric breakdown, categories and languages
- Files view with a detail panel, paginated functions view
- AI review of the worst files, with per-project saved results that can
  be expanded or collapsed; models can be fetched from the provider
- Export reports (HTML/Markdown/JSON) and reviews (Markdown/HTML)
- Recent projects reopen from a cached report; delete from a hover or
  right-click menu
- Settings for language, theme, analysis and AI provider; the API key
  is encrypted with the OS keychain
- UI in Simplified/Traditional Chinese, English and Russian
…e bar

- English is the default UI language; a locale guessed from the OS by
  earlier builds is ignored once, so only a user's own choice is kept.
- The title bar gets a quick EN / 中文 toggle; Settings still lists every
  language.
- Shorter "Params" header and a wider complexity column so English
  headers fit in the functions table.
Copilot AI balanced review requested due to automatic review settings November 2, 2026 08:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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.

2 participants