feat(cli): add tip system for ConnectOnion CLI#101
feat(cli): add tip system for ConnectOnion CLI#101lustsazeus-lab wants to merge 1 commit intoopenonion:mainfrom
Conversation
- Created connectonion/cli/tips.py with: - 17 tips covering major features - Contextual tips based on command - Non-repeating tip rotation - Config file support (tips = true/false) - --quiet flag support - Modified main.py to: - Import tips module - Add --quiet/-q global option - Show tips after command execution - Tips show after successful commands - Tips include docs links Bounty: CLI tip system ()
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e240fc778
ℹ️ 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".
| last_index = data.get("index", 0) | ||
|
|
||
| # Find unseen tips | ||
| unseen = [t for t in matching_tips if id(t) not in seen_ids] |
There was a problem hiding this comment.
Persist stable tip IDs across CLI runs
The seen-tip tracking uses id(t) as the persisted identifier, but object IDs are process-memory addresses and are not stable between separate CLI invocations. Since tips_seen.json is read on later runs, previously saved IDs won't match current TIPS entries, so tips can repeat immediately instead of honoring the non-repeating rotation requirement. Use a deterministic ID (for example, an explicit field or list index) when saving and checking seen tips.
Useful? React with 👍 / 👎.
| # Add a finally callback to show tips after commands | ||
| try: | ||
| app() | ||
| finally: |
There was a problem hiding this comment.
Show tips only on successful command execution
The tip display runs inside a finally block, so it executes even when app() exits due to parse errors or command failures. That causes success-oriented tips to appear after failed invocations and can interfere with failure-focused CLI output flows. Gate show_tip behind successful completion instead of unconditional execution.
Useful? React with 👍 / 👎.
|
@lustsazeus-lab pls attach the screenshot of the tips system |
Summary
Added a tip/hint system to the ConnectOnion CLI that shows users helpful tips after command execution.
Changes
New file: connectonion/cli/tips.py
Modified: connectonion/cli/main.py
Example Output
Acceptance Criteria
Bounty: CLI tip system ($5)