Skip to content

Comments

Fix incorrect attempt number displayed in dismiss_privacy_modal script#10

Open
DominikPalo wants to merge 1 commit intomainfrom
bugfix/fix-attempts-counter
Open

Fix incorrect attempt number displayed in dismiss_privacy_modal script#10
DominikPalo wants to merge 1 commit intomainfrom
bugfix/fix-attempts-counter

Conversation

@DominikPalo
Copy link
Member

This PR fixes an issue where the attempt number was offset in the console output, causing the first attempt to dismiss the privacy modal to be displayed as 0/20 instead of 1/20 and so on.

image

@jozefizso
Copy link
Member

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11f8ec030a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DominikPalo DominikPalo force-pushed the bugfix/fix-attempts-counter branch from 11f8ec0 to 26bb238 Compare February 17, 2026 15:24
@DominikPalo
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@jozefizso
Copy link
Member

@codex review :D

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Check if PowerPoint is running
if pgrep -x "Microsoft PowerPoint" > /dev/null; then
echo "PowerPoint is running (attempt $attempt/$max_attempts)..."
echo "PowerPoint is running (attempt $((attempt + 1))/$max_attempts)..."
Copy link
Member

Choose a reason for hiding this comment

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

I don't get it why should be display attempt + 1 value here instead of just the actual attempt?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because in the script, attempts are indexed from zero (0...<20) and the attempt value is incremented at the end of the while-do block (after echoing the current attempt to the user), so when the attempt variable is set to 0, it is actually the 1st attempt and so on. Another option would be to increase the attempt number at the beginning of the while-do block instead.

Check the screenshot in the PR – in the current implementation, it shows "attempt 0/20", which is nonsense.

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