Skip to content

finances/stmt.ts: various bug fixes identified by gemini#12

Merged
denversc merged 3 commits into
mainfrom
github.prefix924/finances/StmtBugFixes
Jun 17, 2026
Merged

finances/stmt.ts: various bug fixes identified by gemini#12
denversc merged 3 commits into
mainfrom
github.prefix924/finances/StmtBugFixes

Conversation

@denversc

Copy link
Copy Markdown
Owner

No description provided.

denversc added 3 commits June 16, 2026 23:36
…is specified multiple times.

This addresses the following code review feedback: If duplicate file paths are passed to the rename command (e.g., via wildcards or manual duplication), the command will attempt to rename the same file twice. The second attempt will fail with an ENOENT error because the source file has already been renamed/moved. Deduplicating the file paths before processing prevents this crash.

#11 (comment)
… command

This addresses the following code review feedback:

Calling `fs.rename` when the source and destination paths are identical is redundant and can cause unnecessary file system operations or errors. Additionally, `path.join` natively handles cases where `dir` is `.` or empty, making the conditional check redundant. Resolving and comparing the paths beforehand avoids this.

#11 (comment)
…ing PDF parsing

This addresses the following code review feedback:

In JavaScript/TypeScript, parsing an invalid date string may return an invalid `Date` object (where `isNaN(date.getTime())` is true) instead of throwing an error. Adding an explicit check ensures robust error handling.

#11 (comment)

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces validation for the invoice date in parsePublicMobileStatement to handle invalid dates. Additionally, it refactors the renameCommand function to track processed paths, skip renaming when the source and destination filenames are identical or already processed, and output a summary of renamed and skipped files. There are no review comments, so no additional feedback is provided.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@denversc denversc merged commit 219d5ce into main Jun 17, 2026
3 checks passed
@denversc denversc deleted the github.prefix924/finances/StmtBugFixes branch June 17, 2026 04:01
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