Feat v0.7.10 workflow handoff + assignment UI
Some checks failed
CI/CD / test-sqlite (pull_request) Has been cancelled
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-runners (pull_request) Has been skipped
CI/CD / test-frontend (pull_request) Has been cancelled
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-go-pg (pull_request) Has been cancelled
CI/CD / e2e-smoke (pull_request) Has been cancelled

Public→team stage handoff with audience mismatch detection, enriched
assignment API responses (workflow_name, stage_name, sla_breached),
team inbox with claim/assign actions, assignment notifications, team
middleware system-admin bypass fix, and SDK gap closure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 23:15:40 +00:00
parent a9cf71b76d
commit 8f8c1b0e53
17 changed files with 818 additions and 36 deletions

View File

@@ -646,6 +646,7 @@ type WorkflowPageData struct {
BrandingJSON string
InstanceID string // workflow instance ID (used for API calls)
Status string // pending | active | completed | cancelled | stale
AudienceMismatch bool // true when current stage audience is team/system but visitor is unauthenticated
}
// WorkflowLandingPageData is passed to workflow-landing.html.
@@ -745,6 +746,22 @@ func (e *Engine) RenderWorkflow() gin.HandlerFunc {
entryToken = *inst.EntryToken
}
// Detect audience mismatch: stage requires team/system but visitor is
// unauthenticated. Show a "submitted" screen instead of the stage form.
audienceMismatch := false
userID := c.GetString("user_id")
if userID == "" {
// Visitor is unauthenticated — check the current stage audience
for _, s := range stages {
if s.ID == inst.CurrentStage || s.Name == inst.CurrentStage {
if s.Audience == models.AudienceTeam || s.Audience == models.AudienceSystem {
audienceMismatch = true
}
break
}
}
}
e.Render(c, "workflow.html", PageData{
Surface: "workflow",
InstanceName: instanceName,
@@ -763,6 +780,7 @@ func (e *Engine) RenderWorkflow() gin.HandlerFunc {
BrandingJSON: brandingJSON,
InstanceID: inst.ID,
Status: inst.Status,
AudienceMismatch: audienceMismatch,
},
})
}