Skip to content

feat(private_conversation): add menu item and improve title display#1059

Merged
clementb49 merged 1 commit intomasterfrom
privateConvTitleAndMenuItem
Feb 27, 2026
Merged

feat(private_conversation): add menu item and improve title display#1059
clementb49 merged 1 commit intomasterfrom
privateConvTitleAndMenuItem

Conversation

@AAClause
Copy link
Member

@AAClause AAClause commented Feb 26, 2026

  • Add "New private conversation" menu item (Ctrl+Shift+N)
  • Add on_new_private_conversation() handler for convenient private conversation creation
  • Display "(private)" label in frame title for private conversations
  • Refresh frame title when toggling conversation privacy status

Summary by CodeRabbit

  • New Features
    • Added a "New private conversation" menu option for creating private chats
    • Private conversations are now marked with "(private)" in the application window title for easy identification

- Add "New private conversation" menu item (Ctrl+Shift+N)
- Add `on_new_private_conversation()` handler for convenient private conversation creation
- Display "(private)" label in frame title for private conversations
- Refresh frame title when toggling conversation privacy status
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9902f5 and 10874ef.

📒 Files selected for processing (1)
  • basilisk/gui/main_frame.py

Walkthrough

The change adds private conversation creation support to the GUI. A new menu item "New private conversation" is added with a dedicated handler. The new_conversation method signature is extended with an optional private: bool = False parameter. Frame title rendering now appends "(private)" when displaying private conversation tabs, and the frame title refreshes after privacy toggling.

Changes

Cohort / File(s) Summary
Private Conversation Support
basilisk/gui/main_frame.py
Added new menu item and handler on_new_private_conversation() for creating private conversations. Extended new_conversation() signature to accept private: bool = False parameter. Updated frame title rendering to display "(private)" suffix for private tabs and refresh title after privacy toggle.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #147: Modifies MainFrame.new_conversation() signature with new parameters and adds conversation-creation menu handlers, sharing similar structural changes to this PR.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: adding a menu item for private conversations and improving title display with a '(private)' label.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch privateConvTitleAndMenuItem

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “New private conversation” flow to the wxPython GUI so users can quickly start a conversation that won’t be saved, and improves the main window title to clearly indicate when the active conversation is private.

Changes:

  • Add a “New private conversation” menu item with shortcut Ctrl+Shift+N and a corresponding handler.
  • Extend new_conversation() to optionally create the tab as private.
  • Append a “(private)” indicator to the frame title for private conversations and refresh the title when privacy is toggled.

Comment on lines +560 to +573
def on_new_private_conversation(self, event: wx.Event | None):
"""Create a new private conversation tab with the default profile.

Args:
event: The event that triggered the new private conversation action. Can be None.
"""
self.handle_no_account_configured()
profile = config.conversation_profiles().default_profile
if profile:
log.info(
"Creating a new private conversation with default profile (%s)",
profile.name,
)
self.new_conversation(profile, private=True)
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

on_new_private_conversation duplicates the logic from on_new_default_conversation (account check, default profile lookup, logging). To reduce drift and keep behavior consistent, consider factoring this into a single helper (e.g., a parameterized method) and have both handlers call it with the appropriate private flag.

Copilot uses AI. Check for mistakes.
Comment on lines +792 to +801
If the conversation is private, "(private)" is appended to the title.
"""
current_tab = self.current_tab
if not current_tab:
return
tab_title = current_tab.conversation.title or current_tab.title
if current_tab.private:
# Translators: Label appended to window title when conversation is private
private_label = _("private")
tab_title = f"{tab_title} ({private_label})"
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The window-title suffix for private conversations is assembled from multiple parts (parentheses + translated "private"). For some locales, the word order/grammar or punctuation may need to change, which is hard if only "private" is translatable. Consider translating the full suffix/pattern (e.g., "(private)" or a format string that includes the title) so translators can control the whole rendering.

Suggested change
If the conversation is private, "(private)" is appended to the title.
"""
current_tab = self.current_tab
if not current_tab:
return
tab_title = current_tab.conversation.title or current_tab.title
if current_tab.private:
# Translators: Label appended to window title when conversation is private
private_label = _("private")
tab_title = f"{tab_title} ({private_label})"
If the conversation is private, a localized suffix such as "(private)" is appended to the title.
"""
current_tab = self.current_tab
if not current_tab:
return
tab_title = current_tab.conversation.title or current_tab.title
if current_tab.private:
# Translators: Suffix appended to window title when conversation is private, including any punctuation/parentheses
private_label = _("(private)")
tab_title = f"{tab_title} {private_label}"

Copilot uses AI. Check for mistakes.
@clementb49 clementb49 merged commit d757add into master Feb 27, 2026
15 checks passed
@clementb49 clementb49 deleted the privateConvTitleAndMenuItem branch February 27, 2026 07:02
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