Skip to content

feat(gui): add timestamp checkbox to output filename - #13

Merged
fathriAbanoub merged 1 commit into
mainfrom
feature/gui-timestamp-checkbox
Jul 10, 2026
Merged

feat(gui): add timestamp checkbox to output filename#13
fathriAbanoub merged 1 commit into
mainfrom
feature/gui-timestamp-checkbox

Conversation

@fathriAbanoub

@fathriAbanoub fathriAbanoub commented Jul 10, 2026

Copy link
Copy Markdown
Owner
  • Add checkbox next to output filename entry to include YYYYMMDD_HHMMSS timestamp in default filename
  • Update default_name() to support timestamp injection with collision suffix handling (_1, _2, etc.)
  • Enhance should_update_default() with regex pattern matching to recognize timestamped defaults without recomputing the exact string
  • Add _suppress_changed guard to distinguish programmatic vs user edits and prevent false 'user modified' flags during live updates
  • Extract output filename from built command in _execute() to prevent notification showing wrong name after file exists on disk
  • Add deterministic tests with frozen clock to prevent CI flakiness
  • Preserve backward compatibility by appending include_timestamp param to end of default_name() signature

Summary by CodeRabbit

  • New Features

    • Added an option to include timestamps in automatically generated output filenames.
    • Timestamped filenames now support collision handling while preserving custom filenames.
    • The output filename updates correctly when changing timestamp settings or formats.
  • Bug Fixes

    • Success notifications now display the actual output filename created, including collision-adjusted names.
    • Prevented automatic UI updates from incorrectly treating user-entered filenames as defaults.

- Add checkbox next to output filename entry to include YYYYMMDD_HHMMSS
  timestamp in default filename
- Update default_name() to support timestamp injection with collision
  suffix handling (_1, _2, etc.)
- Enhance should_update_default() with regex pattern matching to
  recognize timestamped defaults without recomputing the exact string
- Add _suppress_changed guard to distinguish programmatic vs user edits
  and prevent false 'user modified' flags during live updates
- Extract output filename from built command in _execute() to prevent
  notification showing wrong name after file exists on disk
- Add deterministic tests with frozen clock to prevent CI flakiness
- Preserve backward compatibility by appending include_timestamp param
  to end of default_name() signature
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c9ba7ee5-58fa-47e2-b439-28ed619e43c5

📥 Commits

Reviewing files that changed from the base of the PR and between a6e9ee6 and 12e6a23.

📒 Files selected for processing (2)
  • codegluer_gui.py
  • tests/test_codegluer_gui.py

📝 Walkthrough

Walkthrough

Adds timestamp-aware default filenames to the GUI, recognizes generated filename variants, wires timestamp selection through GTK4 and command construction, and reports the actual executed output filename. Tests cover timestamp generation, collisions, default detection, and command output.

Changes

Timestamped output defaults

Layer / File(s) Summary
Default naming and command construction
codegluer_gui.py, tests/test_codegluer_gui.py
default_name() supports timestamps, should_update_default() recognizes generated variants, and build_command() passes the timestamp option into output generation. Tests cover timestamps, collisions, detection, and command construction.
GUI timestamp state and field updates
codegluer_gui.py
GTK4 adds timestamp state and a checkbox; programmatic output updates are suppressed from user-modification detection, and eligible defaults regenerate when settings change.
Execution output reporting
codegluer_gui.py
Success notifications use the actual output filename from the constructed CLI command.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GTK4_UI
  participant build_command
  participant CLI
  participant SuccessNotification
  GTK4_UI->>build_command: pass timestamp and output options
  build_command->>CLI: construct command with -o output path
  CLI-->>SuccessNotification: return executed command
  SuccessNotification->>SuccessNotification: extract actual output filename
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.62% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a GUI checkbox for timestamped output filenames.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/gui-timestamp-checkbox

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fathriAbanoub
fathriAbanoub merged commit 962ddb3 into main Jul 10, 2026
1 check passed
@fathriAbanoub
fathriAbanoub deleted the feature/gui-timestamp-checkbox branch July 10, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant