From 1a7dce35c8cc6dc5e4da7e7852d4dbdb802753a9 Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Wed, 8 Apr 2026 14:46:18 +0530 Subject: [PATCH 1/6] fix shell env inference --- apps/x/apps/main/src/main.ts | 39 ++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/apps/x/apps/main/src/main.ts b/apps/x/apps/main/src/main.ts index a2ed0aa1..7ade72e3 100644 --- a/apps/x/apps/main/src/main.ts +++ b/apps/x/apps/main/src/main.ts @@ -24,7 +24,7 @@ import { init as initAgentRunner } from "@x/core/dist/agent-schedule/runner.js"; import { init as initAgentNotes } from "@x/core/dist/knowledge/agent_notes.js"; import { initConfigs } from "@x/core/dist/config/initConfigs.js"; import started from "electron-squirrel-startup"; -import { execSync, exec } from "node:child_process"; +import { execSync, exec, execFileSync } from "node:child_process"; import { promisify } from "node:util"; import { init as initChromeSync } from "@x/core/dist/knowledge/chrome-extension/server/server.js"; @@ -38,25 +38,30 @@ if (started) app.quit(); // Fix PATH for packaged Electron apps on macOS/Linux. // Packaged apps inherit a minimal environment that doesn't include paths from -// the user's shell profile (nvm, Homebrew, etc.). Spawn the user's login shell -// to resolve the full PATH, using delimiters to safely extract it from any -// surrounding shell output (motd, greeting messages, etc.). -if (process.platform !== 'win32') { +// the user's shell profile (such as those provided by nvm, Homebrew, etc.). +// The function below spawns the user's login shell and runs a Node.js one-liner +// to print the full environment as JSON, then merges it into process.env. +// This ensures the Electron app has the same PATH and environment as user shell +// (helping find tools installed via Homebrew/nvm/npm, etc.) +function initializeExecutionEnvironment(): void { + if (process.platform === 'win32') return; + + const shell = process.env.SHELL || '/bin/zsh'; + try { - const userShell = process.env.SHELL || '/bin/zsh'; - const delimiter = '__ROWBOAT_PATH__'; - const output = execSync( - `${userShell} -lc 'echo -n "${delimiter}$PATH${delimiter}"'`, - { encoding: 'utf-8', timeout: 5000 }, - ); - const match = output.match(new RegExp(`${delimiter}(.+?)${delimiter}`)); - if (match?.[1]) { - process.env.PATH = match[1]; - } - } catch { - // Silently fall back to the existing PATH if shell resolution fails + const stdout = execFileSync( + shell, + ['-l', '-c', `node -p "JSON.stringify(process.env)"`], + { encoding: 'utf8' } + ).trim(); + + const env = JSON.parse(stdout) as Record; + process.env = { ...env, ...process.env }; + } catch (error) { + console.error('Failed to load shell environment', error); } } +initializeExecutionEnvironment(); // Path resolution differs between development and production: const preloadPath = app.isPackaged From 9c010dabd863c0978ced5fe8f299003fe9887c9f Mon Sep 17 00:00:00 2001 From: tusharmagar Date: Thu, 9 Apr 2026 10:09:18 +0530 Subject: [PATCH 2/6] fix(help-popover): update Discord invite link to the new URL --- apps/x/apps/renderer/src/components/help-popover.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/x/apps/renderer/src/components/help-popover.tsx b/apps/x/apps/renderer/src/components/help-popover.tsx index fdabacc0..3ff08a5c 100644 --- a/apps/x/apps/renderer/src/components/help-popover.tsx +++ b/apps/x/apps/renderer/src/components/help-popover.tsx @@ -25,7 +25,7 @@ export function HelpPopover({ children, tooltip }: HelpPopoverProps) { const [open, setOpen] = useState(false) const handleDiscordClick = () => { - window.open("https://discord.gg/htdKpBZF", "_blank") + window.open("https://discord.com/invite/wajrgmJQ6b", "_blank") } return ( From 1b81a42ed31eac14a50646b14a60513614a3bc03 Mon Sep 17 00:00:00 2001 From: tusharmagar Date: Thu, 9 Apr 2026 13:28:26 +0530 Subject: [PATCH 3/6] refactor(App): update sidebar toggle functionality and adjust button configurations --- apps/x/apps/renderer/src/App.tsx | 60 ++++++-------------------------- 1 file changed, 11 insertions(+), 49 deletions(-) diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index 9107189a..17e49f6e 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -124,8 +124,8 @@ const TITLEBAR_BUTTON_PX = 32 const TITLEBAR_BUTTON_GAP_PX = 4 const TITLEBAR_HEADER_GAP_PX = 8 const TITLEBAR_TOGGLE_MARGIN_LEFT_PX = 12 -const TITLEBAR_BUTTONS_COLLAPSED = 5 -const TITLEBAR_BUTTON_GAPS_COLLAPSED = 4 +const TITLEBAR_BUTTONS_COLLAPSED = 4 +const TITLEBAR_BUTTON_GAPS_COLLAPSED = 3 const GRAPH_TAB_PATH = '__rowboat_graph_view__' const BASES_DEFAULT_TAB_PATH = '__rowboat_bases_default__' @@ -446,12 +446,8 @@ function viewStatesEqual(a: ViewState, b: ViewState): boolean { return true // both graph } -/** Sidebar toggle + back/forward nav */ +/** Sidebar toggle + utility buttons (fixed position, top-left) */ function FixedSidebarToggle({ - onNavigateBack, - onNavigateForward, - canNavigateBack, - canNavigateForward, onNewChat, onOpenSearch, meetingState, @@ -460,10 +456,6 @@ function FixedSidebarToggle({ onToggleMeeting, leftInsetPx, }: { - onNavigateBack: () => void - onNavigateForward: () => void - canNavigateBack: boolean - canNavigateForward: boolean onNewChat: () => void onOpenSearch: () => void meetingState: MeetingTranscriptionState @@ -472,8 +464,7 @@ function FixedSidebarToggle({ onToggleMeeting: () => void leftInsetPx: number }) { - const { toggleSidebar, state } = useSidebar() - const isCollapsed = state === "collapsed" + const { toggleSidebar } = useSidebar() return (
) } @@ -584,15 +551,14 @@ function ContentHeader({ const isCollapsed = state === "collapsed" return (
- {!isCollapsed && onNavigateBack && onNavigateForward ? ( + {onNavigateBack && onNavigateForward ? (