fix: use real project name in notify footer for orchestrator sessions - #38
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Discord webhook 通知のフッタにオーケストレータセッションのハッシュ (プロジェクトパスの sha256 24hex) が表示されていた問題を修正。フッタには実プロジェクト名 (cwd の basename) を表示する。
原因
identity.projectName(sessionManager.js でbasename(cwd)として導出) を使う~/.local/share/ccserver-sandbox/orchestrator/<sha256 24hex>,orchestratorDirForCwd) であるため、basename がハッシュになる変更内容
server/ws/sessionManager.js:createSessionにprojectNameオプションを追加。notifyIdentity をprojectName ?? basename(cwd)に変更server/routes/groups.js: オーケストレータ生成 (初回・restart 両方) で実プロジェクト cwd の basename をprojectNameとして渡す (restart は cwd 欠損ガード付き)server/ws/terminal.js: ブラウザからの再 init 経路でgetGroup(groupId)?.cwdの basename を渡すsessionManager.test.js(explicit projectName 優先 / フォールバック),groups.test.js(restart opts の projectName / cwd 欠損)影響範囲
mcpConfig.js/sandbox-mcp-wrapper.cjs/notify.js/mcpBroker.jsは変更不要 (identity は既に projectName を運ぶ)basename(cwd)のため挙動不変テスト
groups.test.js/sessionManager.test.jsローカルで全パス確認済み (該当5ファイル 66 テスト pass)