Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 25, 2025

Adds a new AllTipsShownBehaviours enum that allows users to configure what happens when all tips have been shown - either clear the shown tips list and continue cycling, or stop showing tips automatically.

Changes

C# Enums and Configuration

  • Created new AllTipsShownBehaviours enum in Configuration.cs with values:
    • ClearShownTipsList = 0 (default) - Clears the shown tips list and continues showing all tips in rotation
    • DoNotShowTips = 1 - Stops showing tips automatically when all tips have been shown
  • Added AllTipsShownBehaviour property to the Configuration class

PowerShell Logic

  • Added TestIfUnseenTipsExist function that compares all tip IDs against TipIdsAlreadyShown.txt
  • Updated WriteAutomaticPowerShellTipIfNeeded to check AllTipsShownBehaviour after cadence evaluation
  • Added AllTipsShownBehaviour parameter to Set-TiPSConfiguration with updated help text and examples

Documentation

  • Updated ReadMe.md with a new "Show only unseen tips" subsection under "🤖 Automatic tip on PowerShell startup"
  • Added example showing how to configure the DoNotShowTips option
  • Documented available parameter values and behavior

Tests

  • Added tests for DoNotShowTips option behavior (shows tip when unseen tips exist, skips when all shown)
  • Added tests for TestIfUnseenTipsExist helper function

Design

This approach separates two orthogonal concerns:

  • Cadence (Never, EverySession, Daily, Weekly, Biweekly, Monthly) controls when to show tips
  • Behaviour (ClearShownTipsList, DoNotShowTips) controls what happens when all tips have been shown

This allows users to combine any cadence with the all-tips-shown behavior for maximum flexibility.

Usage

# Show tips daily, but stop showing them when all tips have been shown
Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -AllTipsShownBehaviour DoNotShowTips

# Show tips every session, clearing the shown tips list when all have been shown (default behavior)
Set-TiPSConfiguration -AutomaticallyWritePowerShellTip EverySession -AllTipsShownBehaviour ClearShownTipsList
Original prompt

This section details on the original issue you should resolve

<issue_title>Feature Request: Only display tip automatically when there is an unseen tip</issue_title>
<issue_description>We currently track all of the tips that have been shown in the TipIdsAlreadyShown.txt file. We want to add a new 'NewTipsOnlyvalue to theWritePowerShellTipCadenceenum, and when configured to use this setting, have the module only automatically display a tip if it is not already in the TipIdsAlreadyShown.txt` file.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add NewTipsOnly setting to TipCadence enum Add NewTipsOnly cadence for showing tips only when unseen tips exist Oct 25, 2025
Copilot AI requested a review from deadlydog October 25, 2025 00:36
Copilot finished work on behalf of deadlydog October 25, 2025 00:36
Biweekly = 4,
Monthly = 5
Monthly = 5,
NewTipsOnly = 6
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of adding a NewTipsOnly value to this WritePowerShellTipCadence enum, please create a new WritePowerShellTipOptions enum with the values CycleThroughAllTips (default) and UnseenTipsOnly. Then add a new public WritePowerShellTipOptions AutoWritePowerShellTipOptions { get; set; } property to the Configuration class, and use that setting to determine if a tip should be automatically written or not.

Copy link
Owner

Choose a reason for hiding this comment

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

@copilot please make these changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes implemented in commit f3dcc9f.

Created a new WritePowerShellTipOptions enum with CycleThroughAllTips (default) and UnseenTipsOnly values, and added the AutoWritePowerShellTipOptions property to the Configuration class.

Users can now combine any cadence with the option, for example:

Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -AutomaticallyWritePowerShellTipOption UnseenTipsOnly

Screenshot showing the new enum and usage:
image

@github-actions
Copy link
Contributor

Overall Project 91.35% 🍏

There is no coverage information present for the Files changed

1 similar comment
@github-actions
Copy link
Contributor

Overall Project 91.35% 🍏

There is no coverage information present for the Files changed

Copilot AI changed the title Add NewTipsOnly cadence for showing tips only when unseen tips exist Add WritePowerShellTipOptions to control showing unseen tips only Oct 27, 2025
Copilot AI requested a review from deadlydog October 27, 2025 23:32
Copilot finished work on behalf of deadlydog October 27, 2025 23:32
@deadlydog
Copy link
Owner

@copilot Also update the ReadMe.md to show an example of setting the AutoWritePowerShellTipOptions to OnlyShowUnseenTips.

@github-actions
Copy link
Contributor

Overall Project 91.21% 🍏

There is no coverage information present for the Files changed

1 similar comment
@github-actions
Copy link
Contributor

Overall Project 91.21% 🍏

There is no coverage information present for the Files changed

Copilot finished work on behalf of deadlydog October 28, 2025 00:26
Copilot AI requested a review from deadlydog October 28, 2025 00:26
Copy link
Contributor Author

Copilot AI commented Oct 28, 2025

@copilot Also update the ReadMe.md to show an example of setting the AutoWritePowerShellTipOptions to OnlyShowUnseenTips.

Added in commit 3a7dbf2.

Created a new subsection "Show only unseen tips" under the "🤖 Automatic tip on PowerShell startup" section with an example showing how to use the OnlyWriteUnseenTips option:

Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -AutomaticallyWritePowerShellTipOption OnlyWriteUnseenTips

The section also explains the available values and behavior of the option.

Copilot finished work on behalf of deadlydog October 28, 2025 00:30
Random = 2
}

public enum WritePowerShellTipOptions
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot Rename the WritePowerShellTipOptions enum to WritePowerShellTipConditions and rename the AutoWritePowerShellTipOptions property to WritePowerShellTipCondition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in commit 60560a1.

The names are now:

  • Enum: WritePowerShellTipConditions
  • Property: WritePowerShellTipCondition

Updated all references across C# and PowerShell files, including tests.

@github-actions
Copy link
Contributor

Overall Project 91.21% 🍏

There is no coverage information present for the Files changed

1 similar comment
@github-actions
Copy link
Contributor

Overall Project 91.21% 🍏

There is no coverage information present for the Files changed

Copilot AI changed the title Add WritePowerShellTipOptions to control showing unseen tips only Add WritePowerShellTipConditions to control showing unseen tips only Oct 28, 2025
Copilot AI requested a review from deadlydog October 28, 2025 00:48
Copilot finished work on behalf of deadlydog October 28, 2025 00:48
@github-actions
Copy link
Contributor

Overall Project 91.21% 🍏

There is no coverage information present for the Files changed

Copilot AI and others added 8 commits October 27, 2025 19:14
Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
… cadence

Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
…psOnly to OnlyWriteUnseenTips

Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
…AutoWritePowerShellTipOptions to WritePowerShellTipCondition

Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
@deadlydog deadlydog force-pushed the copilot/add-newtipsonly-setting branch from afb09f4 to 432df06 Compare October 28, 2025 01:19
@github-actions
Copy link
Contributor

Overall Project 91.21% 🍏

There is no coverage information present for the Files changed

Random = 2
}

public enum WritePowerShellTipConditions
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot Rename the WritePowerShellTipConditions enum to GetPowerShellTipConditions, and rename the WritePowerShellTipCondition class property to GetPowerShellTipCondition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in commit daa49b7.

The names are now:

  • Enum: GetPowerShellTipConditions
  • Property: GetPowerShellTipCondition

Updated all references across C# files, PowerShell files, tests, and documentation.

… WritePowerShellTipCondition to GetPowerShellTipCondition

Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
Copilot AI changed the title Add WritePowerShellTipConditions to control showing unseen tips only Add GetPowerShellTipConditions to control showing unseen tips only Oct 28, 2025
Copilot AI requested a review from deadlydog October 28, 2025 01:34
Copilot finished work on behalf of deadlydog October 28, 2025 01:34
public enum GetPowerShellTipConditions
{
CycleThroughTips = 0,
OnlyWriteUnshownTips = 1
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot Rename the value OnlyWriteUnshownTips to OnlyGetUnshownTips

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in commit 61fae99.

The enum value is now OnlyGetUnshownTips.

Updated all references across C# files, PowerShell files, tests, and documentation.

Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
Copilot AI requested a review from deadlydog October 28, 2025 01:57
Copilot finished work on behalf of deadlydog October 28, 2025 01:57
Random = 2
}

public enum GetPowerShellTipConditions
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot Rename the GetPowerShellTipConditions enum to AllTipsShownBehaviours, rename the CycleThroughTips value to ClearShownTipsList, rename the OnlyGetUnshownTips value to DoNotShowTips, and rename the GetPowerShellTipCondition class property to AllTipsShownBehaviour.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in commit 73e2c88.

The names are now:

  • Enum: AllTipsShownBehaviours
  • Property: AllTipsShownBehaviour
  • Enum values: ClearShownTipsList and DoNotShowTips

Updated all references across C# files, PowerShell files, tests, and documentation.

…aviours, CycleThroughTips to ClearShownTipsList, OnlyGetUnshownTips to DoNotShowTips, GetPowerShellTipCondition to AllTipsShownBehaviour

Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
Copilot AI changed the title Add GetPowerShellTipConditions to control showing unseen tips only Add AllTipsShownBehaviours to control tip display behavior when all tips have been shown Oct 28, 2025
Copilot AI requested a review from deadlydog October 28, 2025 02:32
Copilot finished work on behalf of deadlydog October 28, 2025 02:32
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.

Feature Request: Only display tip automatically when there is an unseen tip

2 participants