Skip to content

feat(ui): support custom workspace names#522

Merged
shantur merged 2 commits into
devfrom
folder-alias-edit
Jun 4, 2026
Merged

feat(ui): support custom workspace names#522
shantur merged 2 commits into
devfrom
folder-alias-edit

Conversation

@shantur
Copy link
Copy Markdown
Collaborator

@shantur shantur commented Jun 4, 2026

Summary

  • Adds editable workspace display names for recent folders.
  • Shows the saved workspace name in the recent folder list and instance tab, including the launching workspace state.
  • Preserves workspace names when recent folders are relaunched and keeps basename fallback for unnamed folders.

Fixes #510

Validation

  • npm run typecheck --workspace @codenomad/ui
  • npm run typecheck --workspace @neuralnomads/codenomad

Allow recent folders to store an optional workspace display name and edit it from the main screen with the same modal pattern used for session title edits. Empty names remain disabled so saved aliases are always meaningful.

Preserve the alias when a recent folder is relaunched and pass it through workspace creation so starting/loading tabs render the workspace name immediately rather than briefly falling back to the path basename.

Update the workspace descriptor mapping, instance tab label fallback, server schema, and locale messages for the new rename workspace copy.

Validation: npm run typecheck --workspace @codenomad/ui; npm run typecheck --workspace @neuralnomads/codenomad.
@shantur
Copy link
Copy Markdown
Collaborator Author

shantur commented Jun 4, 2026

@CodeNomadBot

I want you to perform the gatekeeper checks for latest PR state

check for regressions
check if the PR could be better implemented in any other way
Be the PR gatekeeper
Be ruthless about code quality

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented Jun 4, 2026

Gatekeeper review for latest PR state.

Understood request: review PR #522 ruthlessly for regressions, implementation quality, and whether the approach should be improved. Assumption: this is a review-only request, so I did not modify code.

Findings:

  1. Request changes: renaming an already-open workspace leaves the instance tab stale.
    packages/ui/src/stores/preferences.tsx:599 updates only persisted recentFolders; packages/ui/src/components/instance-tab.tsx:58 renders from props.instance.projectName; and the only place the instance receives a project name is workspace creation/upsert (packages/ui/src/App.tsx:274-298, packages/ui/src/stores/instances.ts:111-147). If a recent folder is already open, the user can click the rename button in the recent-folder row (packages/ui/src/components/folder-selection-view.tsx:969-976), persist the new name, and still see the old tab label until relaunch/refresh/recreation. That violates the PR promise that the saved workspace name is shown in the instance tab. Fix by either deriving the tab label from current recent-folder state by folder path, or by exposing a narrow instance-store update that synchronizes all open instances for that folder when renameRecentFolderProject succeeds.

Quality notes:

  • The current implementation stores the display name in two independent places: recent-folder UI state and Instance.projectName. That split is the source of the stale-state bug. If the name is user preference/UI state, the tab should probably derive from that source of truth; if it is workspace runtime metadata, the rename operation should update the workspace/instance metadata too.
  • The rename button only has title text. This is not the main blocker, but adding an aria-label with the same i18n string would improve keyboard/screen-reader quality.
  • Touched files already exceed the repo’s size warning thresholds and should be watched for future refactors: packages/ui/src/components/folder-selection-view.tsx (~1324 lines), packages/ui/src/stores/instances.ts (~1229 lines), packages/ui/src/stores/preferences.tsx (~974 lines), packages/ui/src/App.tsx (~712 lines). I am not asking for a refactor in this PR.

Validation:

  • git diff --check origin/dev...HEAD: passed.
  • npm run typecheck --workspace @codenomad/ui: failed in this workspace before a PR-specific result due unresolved dependencies/types such as solid-js, @opencode-ai/sdk/v2, and JSX runtime types.
  • npm run typecheck --workspace @neuralnomads/codenomad: failed in this workspace before a PR-specific result with TS2688: Cannot find type definition file for 'node'.

Verdict: not gatekeeper-approved yet. The stale open-instance rename behavior should be fixed before merge; after dependencies are available, rerun the advertised typechecks.

--
Yours,
CodeNomadBot

When a recent workspace name is edited, update all currently open non-stopped instances for the same normalized folder path so their tab labels refresh immediately.

This keeps duplicate open instances for a folder consistent with the saved workspace display name while preserving the existing path basename fallback for unnamed workspaces.

Validation: npm run typecheck --workspace @codenomad/ui.
@shantur
Copy link
Copy Markdown
Collaborator Author

shantur commented Jun 4, 2026

@CodeNomadBot

Now?

@codenomadbot
Copy link
Copy Markdown
Contributor

codenomadbot Bot commented Jun 4, 2026

Re-review after latest push.

Understood request: “Now?” means re-check the latest PR state and confirm whether the prior gatekeeper blocker is resolved. Assumption: review-only, no code changes from me.

Findings:

  • No blocking code findings in the latest PR state. The previous blocker is addressed by 3913c4ae fix(ui): update open workspace tabs after rename.
  • Specifically, packages/ui/src/components/folder-selection-view.tsx:542-543 now persists the renamed recent folder and then calls updateProjectNameForFolder(...), while packages/ui/src/stores/instances.ts:594-604 updates all non-stopped instances whose normalized folder path matches. That closes the stale already-open instance tab behavior I flagged earlier.

Remaining non-blocking notes:

  • The rename button still only has title text. Consider adding aria-label={t("folderSelection.recent.rename")} for accessibility, but I would not block this PR on it.
  • Large touched files remain a future refactor concern, not a merge blocker: packages/ui/src/components/folder-selection-view.tsx (~1325 lines), packages/ui/src/stores/instances.ts (~1242 lines), packages/ui/src/stores/preferences.tsx (~974 lines), packages/ui/src/App.tsx (~712 lines).

Validation:

  • git diff --check origin/dev...HEAD: passed.
  • npm run typecheck --workspace @codenomad/ui: still blocked in this workspace by unresolved installed dependencies/types (solid-js, @opencode-ai/sdk/v2, JSX runtime types, etc.). I do not see evidence this is caused by the PR diff.
  • npm run typecheck --workspace @neuralnomads/codenomad: still blocked in this workspace by TS2688: Cannot find type definition file for 'node'. I do not see evidence this is caused by the PR diff.

Verdict: gatekeeper-approved from code review, with the caveat that CI or a dependency-complete local environment still needs to pass the advertised typechecks before merge.

--
Yours,
CodeNomadBot

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/26948337949

Artifacts expire in 7 days.
Artifacts:

  • pr-522-2294562bfc8948ecb04ec9afd612f403ab57b7fc-tauri-windows
  • pr-522-2294562bfc8948ecb04ec9afd612f403ab57b7fc-electron-macos
  • pr-522-2294562bfc8948ecb04ec9afd612f403ab57b7fc-tauri-macos-arm64
  • pr-522-2294562bfc8948ecb04ec9afd612f403ab57b7fc-electron-windows
  • pr-522-2294562bfc8948ecb04ec9afd612f403ab57b7fc-electron-linux

@shantur shantur merged commit 994157f into dev Jun 4, 2026
11 checks passed
@shantur shantur deleted the folder-alias-edit branch June 4, 2026 11:41
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/26948909400

Artifacts expire in 7 days.
Artifacts:

  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-tauri-macos
  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-tauri-linux
  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-tauri-windows
  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-electron-macos
  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-tauri-macos-arm64
  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-electron-windows
  • pr-522-3913c4ae49d84f6ca8e1218c4a67941a4f74f7d3-electron-linux

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.

[feature] rename instance tabs

1 participant