Skip to content

Rename app to H3Code and harden process execution#1935

Closed
Nebularc18 wants to merge 2 commits intopingdotgg:mainfrom
Nebularc18:feature/process-runner-no-shell
Closed

Rename app to H3Code and harden process execution#1935
Nebularc18 wants to merge 2 commits intopingdotgg:mainfrom
Nebularc18:feature/process-runner-no-shell

Conversation

@Nebularc18
Copy link
Copy Markdown

@Nebularc18 Nebularc18 commented Apr 11, 2026

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 shell in runProcess changes 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 to H3CODE_HOME and legacy T3CODE_HOME) and keeps using the pre-rebrand Electron userData directory if present to avoid losing existing Chromium profile data.

Hardens server-side process execution by spawning with shell: false on 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

  • Renames all branding identifiers across the desktop, web, and build pipeline: product name, bundle IDs, Linux desktop entries, WM_CLASS, and artifact filenames now use h3code / H3Code.
  • Existing users with pre-rebrand userData directories are migrated gracefully; new installs default to ~/.h3code.
  • Sidebar header and splash screen now use APP_BASE_NAME from branding.ts rather than hardcoded strings; stage label is injected via Vite's define.
  • Sets shell: false unconditionally 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.
  • Risk: shell: false is 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

- Preserve argument boundaries for shell-sensitive values
- Keep timeout and buffer failure cleanup killing the full process tree
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8183b2a8-e87f-41e1-b980-049ba8343894

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 11, 2026
@Nebularc18 Nebularc18 force-pushed the feature/process-runner-no-shell branch from 1dfb0c1 to b27dd71 Compare April 11, 2026 19:38
@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Apr 11, 2026
@Nebularc18 Nebularc18 force-pushed the feature/process-runner-no-shell branch from b27dd71 to 00224ff Compare April 11, 2026 19:41
- Rename app display names, IDs, and data paths
- Update web splash, sidebar branding, and build artifact names
@Nebularc18 Nebularc18 force-pushed the feature/process-runner-no-shell branch from 00224ff to 752f261 Compare April 11, 2026 19:45
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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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.

@Nebularc18 Nebularc18 closed this Apr 11, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 11, 2026

Approvability

Verdict: Needs human review

Two high-severity unresolved comments identify potential data loss: the rename changes default paths from .t3/t3code to .h3code/h3code without proper migration fallbacks for existing users. Additionally, the shell: false change in processRunner.ts is a runtime behavior modification that warrants review.

You can customize Macroscope's approvability policy. Learn more.

@Nebularc18 Nebularc18 deleted the feature/process-runner-no-shell branch April 11, 2026 19:50
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 752f261. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant