Skip to content

Feature: display banner only on the first run#62

Open
cereda wants to merge 1 commit intoavelino:mainfrom
cereda:feature/one-time-banner
Open

Feature: display banner only on the first run#62
cereda wants to merge 1 commit intoavelino:mainfrom
cereda:feature/one-time-banner

Conversation

@cereda
Copy link
Copy Markdown
Contributor

@cereda cereda commented Feb 24, 2026

Hopefully a better understanding of #39. 😉

Added --one-time-banner to jbundle. When present, the underlying wrapper will use the app_hash string to look for a file of the same name inside ${HOME}/.jbundle/runs. During the first app run, this file does not exist, so the banner is displayed as expected, and the file is created. Subsequent runs will check for the file, and since it exists, the banner will be omitted.

I need some coffee now. ☕ 🦆

@cereda
Copy link
Copy Markdown
Contributor Author

cereda commented Feb 24, 2026

Clippy works locally, so I blame GH's CI. 😅

Copy link
Copy Markdown
Owner

@avelino avelino left a comment

Choose a reason for hiding this comment

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

Clean implementation, follows the existing compact_banner pattern. A few points before merge:

Tests

  • Missing test for happy path: one_time_banner = true generating stub with JBUNDLE_RUNS and [ ! -e ... ] logic
  • Missing test for default case: one_time_banner = false not containing JBUNDLE_RUNS
  • Missing test for compact_banner = true + one_time_banner = true combination

Cleanup of ~/.jbundle/runs/

This directory will accumulate marker files indefinitely. At minimum document this, ideally clean up alongside jbundle clean.

Race condition

If two instances of the same binary run in parallel for the first time, both pass the [ ! -e ... ] check before the touch. Banner shows up twice. No need to fix now, but document as a known limitation

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.

2 participants