Skip to content

feat: add tips banner below welcome panel on startup#655

Merged
liruifengv merged 4 commits into
mainfrom
feat/tips-banner
Jun 11, 2026
Merged

feat: add tips banner below welcome panel on startup#655
liruifengv merged 4 commits into
mainfrom
feat/tips-banner

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No prior issue was opened for this feature; this PR introduces the Tips Banner capability directly.

Problem

Currently Kimi Code does not surface contextual tips or announcements when the TUI starts. This makes it hard to share timely product updates, getting-started hints, or feature announcements with users.

What changed

  • Added a startup tips banner rendered directly below the welcome panel.
  • Introduced a banner provider that fetches an active campaign or random fallback tip from the configured CDN JSON feed, with a 3-second timeout and silent failure handling.
  • Implemented time-window, version, and semver filtering so tips are only shown to compatible clients during their active window.
  • Rendered the banner via a new pi-tui component with a left accent bar, optional tag, multi-line main text, dim subtext, automatic wrapping, and safe behavior on very narrow terminals.
  • Wired the banner into the TUI startup/resume path without blocking the main UI.
  • Added unit tests covering selection logic, component rendering (including wrap and narrow-width safety), and startup wiring.

Checklist

  • I have read the CONTRIBUTING document.
  • I have explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 17a355f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@17a355f
npx https://pkg.pr.new/@moonshot-ai/kimi-code@17a355f

commit: 17a355f

@liruifengv liruifengv force-pushed the feat/tips-banner branch 9 times, most recently from a1e27d6 to 3396237 Compare June 11, 2026 13:17
- Fetch active/fallback tips from the configured CDN with a 3s timeout.

- Filter tips by semver, client version, and date range.

- Render the banner directly below the welcome panel on startup/resume.

- Support tag, multi-line text, subtext, automatic wrapping, and narrow-terminal safety.
Replace raw chalk calls with currentTheme helpers: tag uses
boldFg('primary'), main text uses boldFg('textStrong'), and subtext
uses fg('textDim') without stacking the dim modifier on the already
dim shade. Strengthen tests to assert the exact themed ANSI output.
@liruifengv liruifengv merged commit 1e2e679 into main Jun 11, 2026
8 checks passed
@liruifengv liruifengv deleted the feat/tips-banner branch June 11, 2026 14:20
@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
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.

1 participant