Skip to content

Improve README structure and fix React hook dependencies in frontend#80

Open
zmrlft wants to merge 1 commit intomainfrom
codex/fix-eslint-errors-in-code
Open

Improve README structure and fix React hook dependencies in frontend#80
zmrlft wants to merge 1 commit intomainfrom
codex/fix-eslint-errors-in-code

Conversation

@zmrlft
Copy link
Owner

@zmrlft zmrlft commented Mar 1, 2026

Motivation

  • Improve documentation discoverability and consistency across English and Chinese README files by adding a table of contents, clearer platform notes, and standardized command examples.
  • Clarify macOS launch instructions and environment/setup steps to reduce user friction when running the app locally.
  • Fix React hook dependency issues and stale closure usages in the frontend to address potential runtime/lint problems.

Description

  • Updated README.md and README_zh.md to add a Contents/目录 section, reorganize headings, standardize command/code blocks, convert rendering images to a table layout, and refine wording for platform notes and the disclaimer.
  • Moved various environment/setup and project workflow instructions into clearer sections and ensured commands are shown in bash code blocks, and added Git to the prerequisites lists.
  • In frontend/src/App.tsx tightened React hook dependencies by adding hasWailsApp to the useCallback and useEffect dependency arrays so effects update correctly and to satisfy hook rules.
  • In frontend/src/components/ImageImportCard.tsx removed invert from the processImage dependency list to avoid unnecessary re-creation of the callback and added processImage to the reprocess effect dependencies to ensure the effect responds to the current processing function.

Testing

  • Ran TypeScript type-check and local frontend build (npm run build) to validate typings and bundling; these checks completed successfully.
  • Performed lint/typeguard checks on modified frontend files to ensure no React hook lint errors remain, and no errors were reported.

Codex Task


Summary by cubic

Improved onboarding by reorganizing the English and Chinese READMEs (table of contents, clearer setup, platform notes) and fixed React hook dependencies to prevent stale effects and satisfy eslint rules.

  • Documentation

    • Added Contents/目录, reorganized headings, standardized bash code blocks.
    • Clarified macOS launch steps, added Git to prerequisites, grouped environment/setup and workflow.
    • Converted rendering examples to a table and refined platform notes/disclaimer wording.
  • Bug Fixes

    • App.tsx: added hasWailsApp to useCallback/useEffect dependencies so checks update correctly.
    • ImageImportCard.tsx: removed invert from processImage deps; added processImage to the reprocess effect.
    • Verified build and lint; no React hook lint errors remain.

Written for commit b676f3e. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant