Closed
Conversation
- Implement cut operation (Ctrl+X) for selected patterns - Add undo capabilities (Ctrl+Z) - Introduce useContributionHistory hook for state management
- Add a Windows batch script to start the dev environment and log the changes
Contributor
There was a problem hiding this comment.
2 issues found across 6 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="frontend/src/components/ContributionCalendar.tsx">
<violation number="1" location="frontend/src/components/ContributionCalendar.tsx:865">
P2: Hardcoded Chinese string breaks internationalization. Use the `t()` function with a translation key instead, like other messages in this file (e.g., `t('messages.noColoredCells')`)</violation>
<violation number="2" location="frontend/src/components/ContributionCalendar.tsx:882">
P2: Hardcoded Chinese string breaks internationalization. Use the `t()` function with a translation key and interpolation instead, similar to other messages like `t('messages.exportSuccess', { filePath: result.filePath })`.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
- add the build_release.bat packaging script and packaging guide doc - simplify the application build process on the windows platform
…tions - removed hard-coded chinese tooltips and used corresponding fields from the translation file
zmrlft
requested changes
Jan 1, 2026
| "@types/react-dom": "^18.0.6", | ||
| "@vitejs/plugin-react": "^2.0.1", | ||
| "autoprefixer": "^10.4.21", | ||
| "baseline-browser-mapping": "^2.9.8", |
|
|
||
| export function useContributionHistory(initialMap: Map<string, number>) { | ||
| const [userContributions, setUserContributions] = useState<Map<string, number>>(initialMap); | ||
| const [historyLength, setHistoryLength] = useState(0); |
Owner
There was a problem hiding this comment.
historyLength 和 futureLength是不是可以去掉,感觉没有用到额,放在这里反而会导致不必要的重渲染
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
使用后想法
有时候将应用默认的字符画到墙上的时候,发现画错位置想修改时就会很麻烦。
既然大佬的GreenWall已经有了“Ctrl+C”和“Ctrl+V”,那我干脆增加了一个“Ctrl+Z”和“Ctrl+X”。
功能总结
详细说明
Ctrl+Z(撤销)
该功能用于退回上一步的操作(例如,较差、填充等)。
Ctrl+X(剪切)
该功能用于将选定区域的贡献图案复制到剪贴板上,并从日历上清除这些图案。
Summary by cubic
Adds Undo (Ctrl+Z) and Cut (Ctrl+X) to the contribution calendar to make editing faster and safer. Also introduces a history hook to manage snapshots and a Windows dev script for easier local runs.
New Features
Dependencies
Written for commit 805f844. Summary will update automatically on new commits.