Skip to content

fix(status): project segment reads producer fields (name/dirty/ts)#157

Merged
vishnujayvel merged 1 commit into
mainfrom
fix/project-segment-producer-fields
Jun 17, 2026
Merged

fix(status): project segment reads producer fields (name/dirty/ts)#157
vishnujayvel merged 1 commit into
mainfrom
fix/project-segment-producer-fields

Conversation

@vishnujayvel

Copy link
Copy Markdown
Owner

Part of #155 (project half; calendar half shipped in #156). Canonical side per maintainer decision: Python adapts to the Go producer.

Bug

The project status-line renderer reads repo / detached, but the Go producer emits name / dirty. FlattenForTUI spreads producer fields verbatim (no rename layer), and the renderer gates on repo (if not repo: return ""), so the project segment rendered empty in production. The "Xm ago" suffix also never showed because the producer never emitted a commit timestamp.

Fix

  • status.py: read name (un-gates the segment); show a * marker when dirty instead of the never-emitted detached relabel.
  • producer_project.go: emit last_commit_ts (committer epoch via git log -1 --format=%ct) so the renderer's existing "Xm ago" suffix gets real data. Key is always present (nil when unavailable) to keep fixture/shape parity.
  • ProjectTestFixture + emptyProjectInfo: carry last_commit_ts. TestProjectTestFixture_FieldConsistency auto-validates producer↔fixture key parity (bidirectional).
  • test_status_segments.py: project renders name, the dirty marker, and the ago suffix (red→green for name + dirty).

Verification

  • New project tests fail on main (segment empty), pass after the fix.
  • Go: TestProject* + FieldConsistency green under -race -p 2, 0 zombies.
  • Python: full test_status_segments + test_status_live_output + test_data = 57 pass.
  • Note: TestDaemon_ConcurrentStartOnlyOneWins flaked once under full-package race load (socket-binding timing) but passes in isolation — unrelated to this diff (project producer only).

Final follow-up (PR 3) will add the Calendar/Project bridge field-name tests (the #154-class Go regression guards) and close #155.

🤖 Generated with Claude Code

The project status-line renderer read 'repo' / 'detached', but the Go project
producer emits 'name' / 'dirty'. FlattenForTUI spreads producer fields verbatim
(no rename layer), and the renderer GATES on 'repo' (`if not repo: return ""`),
so the project segment rendered empty in production -- the Go->JSON->Python
field-drift class (cf. weather bug #29). Part of issue #155; canonical side is
the Go producer (consistent + fixtured + tested), per maintainer decision.

- status.py: read 'name' (un-gates the segment); show a '*' marker when 'dirty'
  instead of the never-emitted 'detached' relabel.
- producer_project.go: emit 'last_commit_ts' (committer epoch via
  `git log -1 --format=%ct`) so the renderer's existing "Xm ago" suffix gets
  real data; key always present (nil when unavailable) for fixture parity.
- ProjectTestFixture + emptyProjectInfo carry last_commit_ts;
  TestProjectTestFixture_FieldConsistency auto-validates producer<->fixture
  key parity.
- test_status_segments.py: project renders name, dirty marker, and the ago
  suffix (red->green for name + dirty).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@vishnujayvel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 52 minutes and 22 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d7663302-8860-4278-b909-a4a69aa16f59

📥 Commits

Reviewing files that changed from the base of the PR and between b9080f7 and be4d728.

📒 Files selected for processing (3)
  • internal/feeds/producer_project.go
  • tui/hookwise_tui/tabs/status.py
  • tui/tests/test_status_segments.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/project-segment-producer-fields

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

Copy link
Copy Markdown
Warnings
⚠️ Architecture-critical files changed. Consider updating arch tests.

Generated by 🚫 dangerJS against be4d728

@vishnujayvel
vishnujayvel merged commit 661e33d into main Jun 17, 2026
6 checks passed
@vishnujayvel
vishnujayvel deleted the fix/project-segment-producer-fields branch June 17, 2026 04:17
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.

bug: project & calendar status-line segments read field names the Go producers never emit (cross-boundary drift)

1 participant