Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Sep 23, 2025

Summary

This PR implements the requested feature to open Roo Code settings in a new, full tab similar to VSCode's own settings, instead of within the extension panel.

Changes

  • Added new openSettingsInNewTab function to create a dedicated webview panel for settings
  • Updated settings button click handler to open settings in new tab instead of within extension
  • Added localized 'Roo Code Settings' title for the new settings tab
  • Updated all localization files with the new tabTitle key

Implementation Details

  • Settings now open in a separate VSCode tab when the settings button is clicked
  • The tab title is properly localized as 'Roo Code Settings'
  • The webview panel retains context when hidden
  • Editor group is locked to prevent files from opening over the settings tab
  • All existing settings functionality remains unchanged

Testing

  • All tests pass successfully
  • Linting and type checking completed without errors
  • Manual testing confirms settings open in a new tab with proper title

Related Slack Request

This implementation addresses the Slack request to make settings open in a new, full tab similar to VSCode's own settings, with everything else continuing to work the same way.


Important

This PR adds functionality to open settings in a new VSCode tab and updates localization for the new tab title.

  • Behavior:
    • Adds openSettingsInNewTab function in registerCommands.ts to open settings in a new VSCode tab.
    • Updates settings button click handler to use the new tab instead of the extension panel.
    • Locks editor group to prevent files from opening over the settings tab.
  • Localization:
    • Adds tabTitle key with value 'Roo Code Settings' to localization files in webview-ui/src/i18n/locales/ca/settings.json, webview-ui/src/i18n/locales/de/settings.json, and webview-ui/src/i18n/locales/en/settings.json ... and 18 other files.
  • Misc:
    • Retains webview panel context when hidden.
    • Logs error to Sentry if unsupported sub-events are received.

This description was created by Ellipsis for d46cdca. You can customize this summary. It will automatically update as commits are pushed.

- Added new openSettingsInNewTab function to create dedicated webview panel for settings
- Updated settings button click handler to open settings in new tab instead of within extension
- Added localized 'Roo Code Settings' title for the new settings tab
- Settings now open in a full VSCode tab with proper state management
- All localization files updated with new tabTitle key
@roomote roomote bot requested review from cte, jr and mrubens as code owners September 23, 2025 10:00
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Sep 23, 2025
"add": "Добавить заголовок",
"remove": "Удалить"
},
"tabTitle": "Roo Code Settings",
Copy link
Contributor

Choose a reason for hiding this comment

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

新增了 'tabTitle' 键,其值为 "Roo Code Settings"。请确认是否有意保持此字符串不翻译,还是应提供俄语版本。

Suggested change
"tabTitle": "Roo Code Settings",
"tabTitle": "Настройки Roo Code",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

"add": "新增標頭",
"remove": "移除"
},
"tabTitle": "Roo Code Settings",
Copy link
Contributor

Choose a reason for hiding this comment

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

在繁體中文文件中添加了 'tabTitle' 鍵,值為 "Roo Code Settings"。請確認這個英文字符串是否符合品牌策略,或是否需要翻譯成繁體中文。

Suggested change
"tabTitle": "Roo Code Settings",
"tabTitle": "Roo Code 設定",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

roomote[bot]

This comment was marked as outdated.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 23, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Sep 23, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 23, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Test review

const settingsTitle = t("settings:tabTitle") || "Roo Code Settings"

const newPanel = vscode.window.createWebviewPanel(
"rooCodeSettings", // Unique ID for settings panel
Copy link
Member

Choose a reason for hiding this comment

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

Using a different viewType ("rooCodeSettings") breaks title bar menu conditions that check for the main panel type (ClineProvider.tabPanelId). This hides commands when the settings tab is active. Use the same type to retain consistent UX across tabs.

Suggested change
"rooCodeSettings", // Unique ID for settings panel
ClineProvider.tabPanelId,

await tabProvider.resolveWebviewView(newPanel)

// Immediately send a message to open the settings view
newPanel.webview.postMessage({ type: "action", action: "settingsButtonClicked" })
Copy link
Member

Choose a reason for hiding this comment

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

Send didBecomeVisible immediately to mirror the old behavior where both messages were posted to ensure reliable initial scroll/visibility handling.

Suggested change
newPanel.webview.postMessage({ type: "action", action: "settingsButtonClicked" })
newPanel.webview.postMessage({ type: "action", action: "settingsButtonClicked" })
newPanel.webview.postMessage({ type: "action", action: "didBecomeVisible" })

}

export const openSettingsInNewTab = async ({ context, outputChannel }: Omit<RegisterCommandOptions, "provider">) => {
const contextProxy = await ContextProxy.getInstance(context)
Copy link
Member

Choose a reason for hiding this comment

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

For consistency with openClineInNewTab (which initializes CodeIndexManager), initialize it here as well to ensure any side effects or listeners are set up before resolving the webview.

Suggested change
const contextProxy = await ContextProxy.getInstance(context)
const contextProxy = await ContextProxy.getInstance(context)
CodeIndexManager.getInstance(context)

const targetCol = hasVisibleEditors ? Math.max(lastCol + 1, 1) : vscode.ViewColumn.Two

// Get the localized title for the settings tab
const settingsTitle = t("settings:tabTitle") || "Roo Code Settings"
Copy link
Member

Choose a reason for hiding this comment

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

The call t("settings:tabTitle") reads from src/i18n, but only webview-ui locales were updated. The title will not be localized in the extension host. Please add settings.json with tabTitle in src/i18n/locales/* to match, or update the implementation plan/description accordingly.

)

// Save as tab type panel.
setPanel(newPanel, "tab")
Copy link
Member

Choose a reason for hiding this comment

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

setPanel(newPanel, "tab") overwrites the global tabPanel reference. Commands that assume tabPanel points to the main chat panel will now target the settings panel. Consider tracking a separate settingsTabPanel ref (and corresponding focus logic) instead of reusing the global tab slot.

@daniel-lxs
Copy link
Member

This breaks the settings, I can't seem to be able to save any setting with this

@daniel-lxs daniel-lxs closed this Sep 24, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Sep 24, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants