Skip to content

Commit 6f25c6b

Browse files
committed
Address review feedback: ordering and idempotency guard
1. Move session-color definition into the ALWAYS_APPLIED block (next to statusline-update-throttle) for ordering consistency. 2. Tighten idempotency check: match the full injection sentinel 'standaloneAgentContext:(()=>{let __c=process.env.TWEAKCC_SESSION_COLOR;' instead of the broad 'TWEAKCC_SESSION_COLOR' substring to avoid false-positive early returns. 3. Rebase onto upstream/main to resolve conflict with channels-mode patch (#653).
1 parent 794b0c1 commit 6f25c6b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/patches/sessionColor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ const INJECTION =
2222
`})()`;
2323

2424
export const writeSessionColor = (oldFile: string): string | null => {
25-
if (oldFile.includes('TWEAKCC_SESSION_COLOR')) {
25+
if (
26+
oldFile.includes(
27+
'standaloneAgentContext:(()=>{let __c=process.env.TWEAKCC_SESSION_COLOR;'
28+
)
29+
) {
2630
return oldFile;
2731
}
2832

0 commit comments

Comments
 (0)