Skip to content

Conversation

@iamdavidhill
Copy link
Contributor

Summary

  • Add "Did you know?" tips feature to the home screen that displays random tips, tricks, and shortcuts to help users discover OpenCode features
  • Tips are hidden for first-time users and shown for returning users, with the ability to toggle visibility using ctrl+h
    Details
    New files:
  • packages/opencode/src/cli/cmd/tui/component/tips.ts - Contains 101 tips covering keyboard shortcuts, slash commands, configuration options, CLI features, and more
  • packages/opencode/src/cli/cmd/tui/component/did-you-know.tsx - Renders the tip box with styled highlights for keybinds and commands
    Features:
  • Tips box appears in the bottom-right corner of the home screen (same width as sidebar)
  • Important terms like keybinds (ctrl+h), slash commands (/undo), and file paths are highlighted in white
  • First-time users (no sessions) don't see tips to avoid overwhelming the initial experience
  • ctrl+h toggles tip visibility, persisted via KV store
  • Tips randomize on each app start and when using /new command
  • Responsive border that adapts to terminal width

@rekram1-node
Copy link
Collaborator

/review

@anomalyco anomalyco deleted a comment from opencode-agent bot Dec 23, 2025
@rekram1-node
Copy link
Collaborator

/oc address the comment:

Suggestion: The hideTips and enableTips functions are each called once and could be inlined. Additionally, the toggle logic with else could be simplified to a single line, per the style guide preference to avoid else statements and keep things in one function:

useKeyboard((evt) => {
if (isFirstTimeUser()) return
if (evt.name === "h" && evt.ctrl && !evt.meta && !evt.shift) {
kv.set("tips_hidden", !tipsHidden())
evt.preventDefault()
}
})
This would also eliminate the need for hideTips and enableTips helper functions (lines 40-47).

—-

Additionally clean up this code a bit so it follows our style guide

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
@opencode-agent
Copy link
Contributor

The changes have been applied. The code now:

  1. Removes the hideTips and enableTips helper functions (lines 43-49)
  2. Simplifies the toggle logic to a single line without else statement
  3. Follows the style guide by avoiding unnecessary function extraction and else statements

New%20session%20-%202025-12-23T01%3A48%3A11.754Z
opencode session  |  github run

@rekram1-node rekram1-node merged commit ae7286c into dev Dec 23, 2025
5 checks passed
@rekram1-node rekram1-node deleted the snapshot-start-screen-tips branch December 23, 2025 19:28
rekram1-node added a commit that referenced this pull request Dec 27, 2025
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
anntnzrb pushed a commit to anntnzrb/opencode-1 that referenced this pull request Dec 29, 2025
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Clouder0 added a commit to Clouder0/overcode that referenced this pull request Jan 4, 2026
Merged upstream dev changes into my_dev job system branch.

Conflicts resolved:
- sidebar.tsx: Combined job system UI with upstream TodoItem and MCP count helpers
- compaction.ts: Kept InvalidTool + added upstream prompt replacement feature
- retry.test.ts: Kept both test suites (socket error + ECONNRESET tests)

Upstream features merged:
- Prompt stashing (anomalyco#6021)
- Did you know tips (anomalyco#5982)
- MCP OAuth debug command (anomalyco#5980)
- Cloudflare AI Gateway (anomalyco#5174)
- Install CLI flags (anomalyco#5885)
- Windows CRLF grep fix (anomalyco#5948)
- Dialog keybind blocking fix (anomalyco#6017)
- Model filtering fix (anomalyco#6053)
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.

3 participants