Rename app to H3Code and harden process execution#1935
Rename app to H3Code and harden process execution#1935Nebularc18 wants to merge 2 commits intopingdotgg:mainfrom
Conversation
- Preserve argument boundaries for shell-sensitive values - Keep timeout and buffer failure cleanup killing the full process tree
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
1dfb0c1 to
b27dd71
Compare
b27dd71 to
00224ff
Compare
- Rename app display names, IDs, and data paths - Update web splash, sidebar branding, and build artifact names
00224ff to
752f261
Compare
| export const APP_BASE_NAME = "T3 Code"; | ||
| export const APP_STAGE_LABEL = import.meta.env.DEV ? "Dev" : "Alpha"; | ||
| export const APP_BASE_NAME = "H3Code"; | ||
| export const APP_STAGE_LABEL = import.meta.env.APP_STAGE_LABEL; |
There was a problem hiding this comment.
🟢 Low src/branding.ts:2
APP_STAGE_LABEL reads import.meta.env.APP_STAGE_LABEL without a fallback, so the environment variable renders as undefined in the display name when unset. The previous implementation defaulted to "Dev" or "Alpha" based on import.meta.env.DEV. Consider restoring a fallback value so the display name remains valid without manual environment configuration.
-export const APP_STAGE_LABEL = import.meta.env.APP_STAGE_LABEL;
+export const APP_STAGE_LABEL = import.meta.env.APP_STAGE_LABEL || (import.meta.env.DEV ? "Dev" : "Alpha");🤖 Copy this AI Prompt to have your agent fix this:
In file apps/web/src/branding.ts around line 2:
`APP_STAGE_LABEL` reads `import.meta.env.APP_STAGE_LABEL` without a fallback, so the environment variable renders as `undefined` in the display name when unset. The previous implementation defaulted to `"Dev"` or `"Alpha"` based on `import.meta.env.DEV`. Consider restoring a fallback value so the display name remains valid without manual environment configuration.
Evidence trail:
apps/web/src/branding.ts (lines 1-4) at REVIEWED_COMMIT shows `APP_STAGE_LABEL = import.meta.env.APP_STAGE_LABEL` with no fallback. The git_diff between MERGE_BASE and REVIEWED_COMMIT shows the previous implementation was `APP_STAGE_LABEL = import.meta.env.DEV ? "Dev" : "Alpha"` which always provided a fallback value.
ApprovabilityVerdict: Needs human review Two high-severity unresolved comments identify potential data loss: the rename changes default paths from You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 752f261. Configure here.
| const BASE_DIR = | ||
| process.env.H3CODE_HOME?.trim() || | ||
| process.env.T3CODE_HOME?.trim() || | ||
| Path.join(OS.homedir(), ".h3code"); |
There was a problem hiding this comment.
Missing legacy fallback for home directory path change
High Severity
BASE_DIR defaults changed from ~/.t3 to ~/.h3code with no fallback check for the old ~/.t3 path. Unlike resolveUserDataPath() which checks if the legacy Electron userdata directory exists before switching to the new name, BASE_DIR unconditionally uses ~/.h3code. Existing users with settings, saved environments, server state (state.sqlite), and logs stored under ~/.t3/userdata/ will silently lose access to all of that data on upgrade.
Reviewed by Cursor Bugbot for commit 752f261. Configure here.
| : process.env.XDG_CONFIG_HOME || Path.join(OS.homedir(), ".config"); | ||
|
|
||
| const legacyPath = Path.join(appDataBase, LEGACY_USER_DATA_DIR_NAME); | ||
| const legacyPath = Path.join(appDataBase, LEGACY_PRE_REBRAND_USER_DATA_DIR_NAME); |
There was a problem hiding this comment.
Electron userdata path missing intermediate legacy fallback
High Severity
resolveUserDataPath checks for the pre-rebrand legacy directory (T3 Code (Alpha)) then falls back to the new h3code name. But USER_DATA_DIR_NAME changed from t3code to h3code, and there's no check for the intermediate t3code directory. Users whose Electron/Chromium profile data lives in ~/.config/t3code (fresh installs made after the override was added but before this rename) will silently lose access to their session data, localStorage, and cookies.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 752f261. Configure here.


Summary: harden process runner execution and rename visible app branding to H3Code. Verification: bun fmt, bun lint, bun typecheck.
Note
Medium Risk
Rebranding touches desktop/web packaging identifiers and user data paths, which can affect update/installation and profile migration. Disabling
shellinrunProcesschanges Windows process execution semantics and could break callers relying on shell behavior, though it reduces injection risk.Overview
Renames the app branding from T3 Code (Alpha) to H3Code across the desktop app, web UI, and build/packaging metadata (product name, bundle/app IDs, artifact names, Linux desktop entry/WM class).
Updates desktop storage defaults to
~/.h3code(with fallbacks toH3CODE_HOMEand legacyT3CODE_HOME) and keeps using the pre-rebrand ElectronuserDatadirectory if present to avoid losing existing Chromium profile data.Hardens server-side process execution by spawning with
shell: falseon all platforms, and adds a regression test ensuring shell-sensitive arguments preserve boundaries.Reviewed by Cursor Bugbot for commit 752f261. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Rename app to H3Code and fix shell-free process execution on all platforms
h3code/H3Code.~/.h3code.APP_BASE_NAMEfrom branding.ts rather than hardcoded strings; stage label is injected via Vite'sdefine.shell: falseunconditionally in processRunner.ts, replacing the Windows-only shell path; a new test asserts that arguments containing spaces, ampersands, and quotes are preserved across process boundaries.shell: falseis a behavioral change on Windows — commands that previously relied on shell expansion (e.g. glob patterns or built-in commands) will no longer work.📊 Macroscope summarized 752f261. 10 files reviewed, 2 issues evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues