feat: add compact startup diagnostics panel#97
feat: add compact startup diagnostics panel#97zouyonghe wants to merge 3 commits intoAstrBotDevs:mainfrom
Conversation
Show backend launch stages and recent logs in a collapsible startup panel so desktop users can track startup progress on top of upstream main without the loading window growing too tall.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the desktop application's startup experience by transforming a static loading screen into an informative, dynamic interface. It introduces a compact summary and an expandable diagnostics panel that provides real-time updates on the backend's startup progress, including current stages and relevant log entries. This change addresses the previous lack of transparency during backend initialization, ensuring users are no longer left guessing whether the application is progressing or stuck, thereby enhancing perceived responsiveness and troubleshooting capabilities. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive startup diagnostics panel, significantly improving the user experience by providing detailed feedback during application launch. The changes include new Rust backend logic for tracking startup milestones and logging, a new Tauri command to expose this state, and a responsive frontend UI to display the information. The implementation is well-structured, includes thorough unit tests for the new backend logic, and ensures proper localization and accessibility for the UI elements. Overall, this is a well-executed feature that addresses a critical user pain point.
Summary
This change makes the desktop startup screen explain what the bundled backend is doing instead of showing only a static loading message. Users now get a compact startup summary row by default and can expand a restrained diagnostics panel to see the current startup stage plus recent desktop and backend log lines without the loading window growing uncontrollably.
The user-facing problem was that the desktop build could appear stuck while the backend was still starting. The startup shell had no direct bridge to the backend launch milestones, so there was no clear way to tell whether the app was still progressing, waiting for HTTP readiness, or had failed. On smaller windows, any future diagnostics surface also needed to stay compact enough that it would not crowd out the main loading UI.
The root cause was that startup state only lived implicitly inside the Rust launch flow and log files. The loading page could not read a structured snapshot of startup progress, did not know which log lines belonged to the current attempt, and had no compact UI model for rendering the flow safely inside the startup window.
This PR adds a startup panel snapshot model in Rust, updates the startup flow to record structured launch milestones, and exposes a Tauri command that the loading shell polls. The shell now renders localized stage summaries, compact stage chips, and a capped diagnostics panel with internally scrolling desktop and backend log tails. The snapshot logic also tracks per-attempt log offsets so stale lines from previous launches do not leak into the current startup view. The follow-up clippy fix limits a reader helper to tests and updates boolean assertions so the new startup panel tests pass strict linting in CI.
Test Plan
pnpm test:prepare-resourcescargo test --manifest-path src-tauri/Cargo.tomlcargo clippy --manifest-path src-tauri/Cargo.toml --locked --all-targets -- -D warningscargo tauri build --debugSummary by Sourcery
Add a structured startup diagnostics panel for the desktop app that surfaces backend startup stages and recent logs in a compact, localized UI.
New Features:
Enhancements:
Tests: