Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/__tests__/path-utils-909.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ describe('Issue #909: computeProjectHash cross-platform normalization', () => {
it('returns fallback for empty input', () => {
expect(computeProjectHash('')).toBe('-');
});

it('replaces dots in segments to match Claude Code slug (Issue #3286)', () => {
expect(computeProjectHash('/home/me/.claude/repo')).toBe('-home-me--claude-repo');
expect(computeProjectHash('/Users/x/Documents/aegis/.claude/worktrees/foo')).toBe('-Users-x-Documents-aegis--claude-worktrees-foo');
});
});
7 changes: 5 additions & 2 deletions src/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,11 @@ export class SessionMonitor {
const result = await this.sessions.readMessagesForMonitor(session.id);
const prevStatus = this.lastStatus.get(session.id);

// Forward messages only when watcher is NOT active (fallback polling path)
if (!this.jsonlWatcher && result.messages.length > 0) {
// Forward messages only when watcher is NOT active for THIS session (#3286).
// Checking the watcher instance alone misses the discovery poll where the
// fallback just set jsonlPath but the watcher hasn't started yet — entries
// read here would otherwise be dropped before the watcher subscribes.
if (!this.jsonlWatcher?.isWatching(session.id) && result.messages.length > 0) {
this.rateLimitedSessions.delete(session.id);
for (const msg of result.messages) {
await this.forwardMessage(session, msg);
Expand Down
2 changes: 1 addition & 1 deletion src/path-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function computeProjectHash(workDir: string): string {
const segments = withLowerDrive
.split('/')
.filter(Boolean)
.map((segment) => segment.replace(/:/g, '').replace(/\s+/g, '-'));
.map((segment) => segment.replace(/:/g, '').replace(/\s+/g, '-').replace(/\./g, '-'));

if (segments.length === 0) return '-';
return `-${segments.join('-')}`;
Expand Down
Loading