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
4 changes: 4 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ Before starting any work, familiarize yourself with the codebase by reviewing th
### Additional Documentation
- **frontend/THEMES.md** - Theme system documentation

## Dependencies

- **Pin comfygit-core to exact versions** - Always use `==X.Y.Z` (not `>=`) for the core dependency in pyproject.toml. This ensures reproducible builds and prevents unexpected breakage from core updates.

## General
Don't make any implementation overly complex. This is a one-person dev MVP project.
We are still pre-customer - any unnecessary fallbacks, unnecessary versioning, testing overkill should be avoided.
Expand Down
43 changes: 27 additions & 16 deletions frontend/src/components/CommitPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@
Loading...
</div>

<div v-if="hasUncommittedIssues" class="issues-error">
<div v-if="hasWorkflowIssues" class="issues-error">
<div class="error-header">
<span class="error-icon">⚠</span>
<span class="error-title">{{ uncommittedWorkflowsWithIssues.length }} workflow(s) can't run</span>
<span class="error-title">{{ workflowsWithIssues.length }} workflow(s) have issues</span>
</div>
<div class="issues-list">
<div v-for="workflow in uncommittedWorkflowsWithIssues" :key="workflow.name" class="issue-item">
<strong>{{ workflow.name }}</strong>: {{ workflow.issue_summary }}
<div v-for="workflow in workflowsWithIssues" :key="workflow.name" class="issue-item">
<strong>{{ workflow.name }}</strong>
<span class="workflow-state">({{ workflow.sync_state }})</span>:
{{ workflow.issue_summary }}
</div>
</div>
<BaseCheckbox v-model="allowIssues" class="allow-issues-toggle">
Expand Down Expand Up @@ -138,14 +140,16 @@
Loading...
</div>

<div v-if="hasUncommittedIssues" class="issues-error">
<div v-if="hasWorkflowIssues" class="issues-error">
<div class="error-header">
<span class="error-icon">⚠</span>
<span class="error-title">{{ uncommittedWorkflowsWithIssues.length }} workflow(s) can't run</span>
<span class="error-title">{{ workflowsWithIssues.length }} workflow(s) have issues</span>
</div>
<div class="issues-list">
<div v-for="workflow in uncommittedWorkflowsWithIssues" :key="workflow.name" class="issue-item">
<strong>{{ workflow.name }}</strong>: {{ workflow.issue_summary }}
<div v-for="workflow in workflowsWithIssues" :key="workflow.name" class="issue-item">
<strong>{{ workflow.name }}</strong>
<span class="workflow-state">({{ workflow.sync_state }})</span>:
{{ workflow.issue_summary }}
</div>
</div>
<BaseCheckbox v-model="allowIssues" class="allow-issues-toggle">
Expand Down Expand Up @@ -223,20 +227,19 @@ const hasSpecificChanges = computed(() => {
gc.nodes_added.length > 0 || gc.nodes_removed.length > 0
})

const uncommittedWorkflowsWithIssues = computed(() => {
// Show ALL workflows with issues - is_commit_safe checks all workflows, not just uncommitted
const workflowsWithIssues = computed(() => {
if (!props.status?.workflows.analyzed) return []
return props.status.workflows.analyzed.filter(
w => w.has_issues && (w.sync_state === 'new' || w.sync_state === 'modified')
)
return props.status.workflows.analyzed.filter(w => w.has_issues)
})

const hasUncommittedIssues = computed(() => uncommittedWorkflowsWithIssues.value.length > 0)
const hasWorkflowIssues = computed(() => workflowsWithIssues.value.length > 0)

const isBlockedByIssues = computed(() => hasUncommittedIssues.value && !allowIssues.value)
const isBlockedByIssues = computed(() => hasWorkflowIssues.value && !allowIssues.value)

async function handleCommit() {
// Guard: prevent commit if there are unresolved issues and user hasn't explicitly allowed
if (hasUncommittedIssues.value && !allowIssues.value) return
if (hasWorkflowIssues.value && !allowIssues.value) return
if (!hasChanges.value || !message.value.trim() || isLoading.value) return

isLoading.value = true
Expand All @@ -250,7 +253,9 @@ async function handleCommit() {
} else if (res.status === 'no_changes') {
emit('committed', { success: false, message: 'No changes to commit' })
} else if (res.status === 'blocked') {
emit('committed', { success: false, message: 'Commit blocked - enable "Allow issues" to force commit' })
// Include actual issues from the API response
const issuesList = res.issues?.map(i => `${i.name}: ${i.issue}`).join('; ') || 'Unknown issues'
emit('committed', { success: false, message: `Commit blocked - ${issuesList}. Enable "Allow issues" to force.` })
} else {
emit('committed', { success: false, message: res.message || 'Commit failed' })
}
Expand Down Expand Up @@ -429,6 +434,12 @@ async function handleCommit() {
color: var(--cg-color-text-primary);
}

.workflow-state {
color: var(--cg-color-text-muted);
font-size: var(--cg-font-size-xs);
margin-left: 4px;
}

.allow-issues-toggle {
margin-top: 8px;
font-size: var(--cg-font-size-xs);
Expand Down
2 changes: 1 addition & 1 deletion js/comfygit-panel.css

Large diffs are not rendered by default.

Loading
Loading