Skip to content

fix: improve git sync publish and filtering#1971

Merged
yottahmd merged 4 commits intomainfrom
fix/git-sync-publish-force
Apr 6, 2026
Merged

fix: improve git sync publish and filtering#1971
yottahmd merged 4 commits intomainfrom
fix/git-sync-publish-force

Conversation

@yottahmd
Copy link
Copy Markdown
Collaborator

@yottahmd yottahmd commented Apr 6, 2026

Summary

  • add a force publish checkbox to the git sync publish modal for conflicted single-item publishes
  • reconcile stale git sync state so previously untracked items become synced once local and remote content match
  • default the git sync type view to DAGs and remove the aggregate All tab
  • add a search field to filter git sync items by item ID or display name

Why

The git sync page had a few usability and correctness gaps:

  • conflicted items had a backend force publish path but no web UI control
  • the page could stay stuck in Unpublished because stale untracked state was never promoted to synced after publish/pull
  • large sync sets were difficult to navigate without a search field
  • the aggregate All type tab was less useful than landing directly on the primary DAGs view

Testing

  • go test ./internal/gitsync -count=1
  • pnpm typecheck in ui/
    • currently fails due to a pre-existing unrelated error in ui/src/pages/queues/index.tsx:125 (Cannot find name components``)

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

The change introduces conflict-aware force-publish functionality to the git-sync module. A new publishForce state flag is conditionally exposed via checkbox when conflicts are detected, and the flag is forwarded to the publish API endpoint alongside the standard request.

Changes

Cohort / File(s) Summary
Force Publish Feature
ui/src/pages/git-sync/index.tsx
Added publishForce state with automatic reset on modal open/close and when changing publish targets. Introduced conditional "Force publish" checkbox rendered only for conflicted items. Updated handlePublish to accept and forward the force flag to the API, with cleanup after successful publish.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The PR title 'fix: improve git sync publish and filtering' is vague and doesn't match the actual main changes, which focus on adding a force publish checkbox to resolve conflicts. The mention of 'filtering' is not addressed in the PR objectives or code changes. Consider using a more specific title like 'fix: add force publish option to git sync modal' to accurately reflect the primary change of enabling conflict-aware force publish capability.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/git-sync-publish-force

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@ui/src/pages/git-sync/index.tsx`:
- Around line 553-557: The modal can submit a hidden stale publishForce value
when the selected item's status changes; ensure publishForce cannot be sent
unless the item is currently in conflict by: when computing
publishItemStatus/canForcePublish (using publishModal and
rowByID.get(...).item.status), clear or set publishModal.publishForce to false
whenever canForcePublish is false, and also guard the publish submission logic
to only include publishForce in the payload if canForcePublish is true (i.e.,
check canForcePublish before reading publishModal.publishForce in the submit
handlers that build the publish request).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a5a85d6-1486-4eb8-ad40-edf755c90a12

📥 Commits

Reviewing files that changed from the base of the PR and between 34cc3a3 and 25532bf.

📒 Files selected for processing (1)
  • ui/src/pages/git-sync/index.tsx

Comment thread ui/src/pages/git-sync/index.tsx
@yottahmd yottahmd changed the title fix: add force publish option to git sync modal fix: improve git sync publish and filtering Apr 6, 2026
@yottahmd yottahmd merged commit 75b2882 into main Apr 6, 2026
5 checks passed
@yottahmd yottahmd deleted the fix/git-sync-publish-force branch April 6, 2026 13:49
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.

1 participant