Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

feat(issues): always allow creating custom statuses (MUL-6643) (#7503)

Bohan Jiang3c4288ddea3a
diff --git a/packages/views/locales/en/settings.json b/packages/views/locales/en/settings.json
index 25164ef739..0d9d3e81cd 100644
--- a/packages/views/locales/en/settings.json
+++ b/packages/views/locales/en/settings.json
@@ -7,7 +7,6 @@
"show_archived": "Show archived ({{count}})",
"archived_badge": "Archived",
"archived_hint": "Retired from new assignments. Issues already on it keep it.",
- "flag_off": "Custom statuses are not enabled for this deployment yet. The built-in statuses below work as usual.",
"reorder_failed": "Could not save the new order.",
"actions": {
"open": "Actions for {{name}}",
diff --git a/packages/views/locales/ja/settings.json b/packages/views/locales/ja/settings.json
index b0820f4758..9af44e6c08 100644
--- a/packages/views/locales/ja/settings.json
+++ b/packages/views/locales/ja/settings.json
@@ -7,7 +7,6 @@
"show_archived": "アーカイブ済みを表示({{count}})",
"archived_badge": "アーカイブ済み",
"archived_hint": "新規の割り当てには使えません。すでにこのステータスのタスクはそのままです。",
- "flag_off": "このデプロイではカスタムステータスがまだ有効化されていません。下の組み込みステータスは通常どおり使えます。",
"reorder_failed": "並び順を保存できませんでした。",
"actions": {
"open": "{{name}} の操作",
diff --git a/packages/views/locales/ko/settings.json b/packages/views/locales/ko/settings.json
index 06f9c3b609..885a72d702 100644
--- a/packages/views/locales/ko/settings.json
+++ b/packages/views/locales/ko/settings.json
@@ -7,7 +7,6 @@
"show_archived": "보관됨 표시 ({{count}})",
"archived_badge": "보관됨",
"archived_hint": "새로 지정할 수 없습니다. 이미 이 상태인 태스크는 그대로 유지됩니다.",
- "flag_off": "이 배포에서는 사용자 지정 상태가 아직 활성화되지 않았습니다. 아래 기본 상태는 평소대로 동작합니다.",
"reorder_failed": "새 순서를 저장하지 못했습니다.",
"actions": {
"open": "{{name}} 작업",
diff --git a/packages/views/locales/zh-Hans/settings.json b/packages/views/locales/zh-Hans/settings.json
index 7a2418dbf5..4c365a3a9b 100644
--- a/packages/views/locales/zh-Hans/settings.json
+++ b/packages/views/locales/zh-Hans/settings.json
@@ -7,7 +7,6 @@
"show_archived": "显示已归档({{count}})",
"archived_badge": "已归档",
"archived_hint": "已停止用于新的指派,已经在该状态上的任务保持不变。",
- "flag_off": "当前部署尚未开启自定义状态,下面的内置状态照常使用。",
"reorder_failed": "排序保存失败。",
"actions": {
"open": "{{name}} 的操作",
diff --git a/packages/views/settings/components/issue-statuses-tab.test.tsx b/packages/views/settings/components/issue-statuses-tab.test.tsx
index a6ad6ae09e..255a547c22 100644
--- a/packages/views/settings/components/issue-statuses-tab.test.tsx
+++ b/packages/views/settings/components/issue-statuses-tab.test.tsx
@@ -10,7 +10,6 @@ import { IssueStatusesTab } from "./issue-statuses-tab";
const reorderMutate = vi.hoisted(() => vi.fn());
let catalog: IssueStatusEntry[] = [];
let role: string = "owner";
-let flagOn = true;
vi.mock("@tanstack/react-query", () => ({
useQuery: (options: { queryKey: readonly unknown[] }) => ({
@@ -22,7 +21,6 @@ vi.mock("@multica/core/hooks", () => ({ useWorkspaceId: () => "ws-1" }));
vi.mock("@multica/core/auth", () => ({
useAuthStore: (selector: (s: unknown) => unknown) => selector({ user: { id: "u-1" } }),
}));
-vi.mock("@multica/core/config", () => ({ useFeatureEnabled: () => flagOn }));
vi.mock("@multica/core/workspace/queries", () => ({
memberListOptions: () => ({ queryKey: ["members", "ws-1"] }),
}));
@@ -86,28 +84,16 @@ afterEach(() => {
reorderMutate.mockClear();
catalog = [];
role = "owner";
- flagOn = true;
});
describe("IssueStatusesTab", () => {
- it("offers status creation to an owner when the rollout flag is on", () => {
+ // Creation answers to workspace role alone since MUL-6643 removed the
+ // rollout flag; an owner gets the affordance on every deployment.
+ it("offers status creation to an owner", () => {
catalog = [BUILT_IN_IN_REVIEW];
render(<IssueStatusesTab />);
expect(screen.getAllByLabelText(en.issue_statuses.add).length).toBeGreaterThan(0);
- expect(screen.queryByText(en.issue_statuses.flag_off)).toBeNull();
- });
-
- // The flag gates CREATION only. Existing statuses stay fully readable, which
- // is what makes the flag safe to leave off after the backend ships.
- it("hides creation and explains why when the flag is off", () => {
- catalog = [BUILT_IN_IN_REVIEW, entry({ key: "qa", name: "QA" })];
- flagOn = false;
- render(<IssueStatusesTab />);
-
- expect(screen.queryByLabelText(en.issue_statuses.add)).toBeNull();
- expect(screen.getByText(en.issue_statuses.flag_off)).toBeInTheDocument();
- expect(screen.getByText("QA")).toBeInTheDocument();
});
it("hides creation and row actions from a non-admin member", () => {
diff --git a/packages/views/settings/components/issue-statuses-tab.tsx b/packages/views/settings/components/issue-statuses-tab.tsx
index e54a9b27de..6b9ba38d4e 100644
--- a/packages/views/settings/components/issue-statuses-tab.tsx
+++ b/packages/views/settings/components/issue-statuses-tab.tsx
@@ -27,7 +27,6 @@ import {
import { CSS } from "@dnd-kit/utilities";
import { useWorkspaceId } from "@multica/core/hooks";
import { useAuthStore } from "@multica/core/auth";
-import { useFeatureEnabled } from "@multica/core/config";
import { memberListOptions } from "@multica/core/workspace/queries";
import { issueStatusColor, issueStatusListOptions } from "@multica/core/issue-statuses/queries";
import {
@@ -123,7 +122,6 @@ const EMPTY_DRAFT: StatusDraft = {
export function IssueStatusesTab() {
const { t } = useT("settings");
const wsId = useWorkspaceId();
- const canCreate = useFeatureEnabled("custom_issue_statuses");
const [showArchived, setShowArchived] = useState(false);
const [createCategory, setCreateCategory] = useState<IssueStatusCategory | null>(null);
@@ -164,12 +162,6 @@ export function IssueStatusesTab() {
description={t(($) => $.issue_statuses.description)}
>
<div className="space-y-4">
- {!canCreate && (
- <p className="rounded-lg border border-surface-border bg-muted/20 px-4 py-3 text-caption text-muted-foreground">
- {t(($) => $.issue_statuses.flag_off)}
- </p>
- )}
-
{/* Offered only once the workspace has something archived. A permanently
disabled "Show archived (0)" is a control that can never do
anything. */}
@@ -196,7 +188,6 @@ export function IssueStatusesTab() {
builtIn={group.builtIn}
custom={group.custom}
canManage={isAdmin}
- canCreate={isAdmin && canCreate}
onCreate={() => setCreateCategory(group.category)}
onEdit={setEditing}
onArchive={setPendingArchive}
@@ -227,7 +218,6 @@ function CategorySection({
builtIn,
custom,
canManage,
- canCreate,
onCreate,
onEdit,
onArchive,
@@ -236,7 +226,6 @@ function CategorySection({
builtIn: IssueStatusEntry | undefined;
custom: IssueStatusEntry[];
canManage: boolean;
- canCreate: boolean;
onCreate: () => void;
onEdit: (status: IssueStatusEntry) => void;
onArchive: (status: IssueStatusEntry) => void;
@@ -295,7 +284,7 @@ function CategorySection({
<span className="text-caption font-medium text-muted-foreground">
{labelOf(category)}
</span>
- {canCreate && (
+ {canManage && (
<Tooltip>
<TooltipTrigger
render={
diff --git a/server/internal/featureflags/keys.go b/server/internal/featureflags/keys.go
index bf0d4670d5..c9af98d736 100644
--- a/server/internal/featureflags/keys.go
+++ b/server/internal/featureflags/keys.go
@@ -23,24 +23,6 @@ const (
// gate pinned Task/Run execution: disabling discovery and management must not
// mutate an immutable execution manifest that is already in flight.
PluginsV1 = "plugins_v1"
- // CustomIssueStatuses gates CREATING a custom issue status (MUL-6243). It is
- // a rollout gate, not a behavior switch, and it is deliberately one-way.
- //
- // The readers ship unconditionally and are safe to: issuestatus.Effective is
- // the identity function on the 7 built-in keys, so a pod running this code
- // behaves exactly as before until a custom status exists. The hazard is the
- // other direction — the first custom status written by a new pod is a value
- // an OLD pod cannot interpret, and old pods would fall back to literal
- // comparisons and mishandle the issue's events and tasks. Gating creation
- // means that value cannot come into existence until the whole fleet can read
- // it, which removes the need for a coordinated restart.
- //
- // Enable only after every pod is running this version or later. Once a
- // workspace has custom statuses, turning it back off stops new ones being
- // created but does NOT make the existing ones safe for an older binary; a
- // true rollback requires migrating those issues back to built-in statuses
- // first (migration 337's down direction refuses precisely because of this).
- CustomIssueStatuses = "custom_issue_statuses"
// agentBuilderCompat is no longer a release flag. Keep publishing the key
// as enabled so installed desktop clients that still gate the AI creation
// entry on this config decision receive the permanently enabled behavior.
@@ -62,9 +44,6 @@ var frontendPublicFlags = []string{
BillingWorkspaceSubscriptions,
ComposioMCPApps,
PluginsV1,
- // The settings UI needs this to decide whether to offer status creation at
- // all. Without it the tab would show a "New status" button that 403s.
- CustomIssueStatuses,
}
func BillingWorkspaceSubscriptionsEnabled(ctx context.Context, flags *featureflag.Service) bool {
@@ -79,13 +58,6 @@ func PluginsV1Enabled(ctx context.Context, flags *featureflag.Service) bool {
return flags.IsEnabled(ctx, PluginsV1, false)
}
-// CustomIssueStatusesEnabled reports whether creating custom issue statuses is
-// allowed. Default false: a fleet mid-rollout must not be able to mint a status
-// value its older pods cannot interpret.
-func CustomIssueStatusesEnabled(ctx context.Context, flags *featureflag.Service) bool {
- return flags.IsEnabled(ctx, CustomIssueStatuses, false)
-}
-
func EvaluateFrontendPublicFlags(ctx context.Context, flags *featureflag.Service) map[string]bool {
out := make(map[string]bool, len(frontendPublicFlags)+3)
for _, key := range frontendPublicFlags {
diff --git a/server/internal/featureflags/keys_test.go b/server/internal/featureflags/keys_test.go
index b718932f3d..eead10ff59 100644
--- a/server/internal/featureflags/keys_test.go
+++ b/server/internal/featureflags/keys_test.go
@@ -38,6 +38,24 @@ func TestAgentSkillTogglesCompatDecisionStaysEnabled(t *testing.T) {
}
}
+// MUL-6643: the server-side rollout gate on creating a custom status is gone,
+// but the key stays unpublished on purpose. v0.4.30 shipped the feature without
+// the four fixes that landed in v0.4.31 — custom-status cards render in the
+// wrong board column (MUL-6409), the timeline glyph loses the status identity
+// (MUL-6413), built-in colors are wrong (MUL-6440), and the catalog does not
+// sync over the realtime channel (MUL-6458). Those clients gate their "New
+// status" button on this key and fail closed on absence, so NOT publishing it
+// is what keeps a client that cannot render the result from producing one.
+//
+// Clients from v0.4.33 read no flag at all, so they get the button the moment
+// they update — the key never has to be published again.
+func TestCustomIssueStatusesIsNotPublished(t *testing.T) {
+ flags := EvaluateFrontendPublicFlags(context.Background(), nil)
+ if _, published := flags["custom_issue_statuses"]; published {
+ t.Fatal("custom_issue_statuses must stay unpublished so pre-v0.4.33 clients keep creation hidden")
+ }
+}
+
func TestPluginsV1DefaultsOff(t *testing.T) {
flags := EvaluateFrontendPublicFlags(context.Background(), nil)
if flags[PluginsV1] {
diff --git a/server/internal/handler/config_test.go b/server/internal/handler/config_test.go
index 828fc5c35d..665d5ce221 100644
--- a/server/internal/handler/config_test.go
+++ b/server/internal/handler/config_test.go
@@ -449,6 +449,13 @@ func TestGetConfigExposesFrontendFeatureFlags(t *testing.T) {
if !cfg.FeatureFlags["settings_resource_labels"] {
t.Fatalf("settings_resource_labels: want true for installed clients, got false")
}
+ // Deliberately unpublished: pre-v0.4.33 clients gate their "New status"
+ // button on this key and fail closed, which is how a client that predates
+ // the v0.4.31 rendering fixes is kept from creating one. See
+ // featureflags.TestCustomIssueStatusesIsNotPublished.
+ if _, published := cfg.FeatureFlags["custom_issue_statuses"]; published {
+ t.Fatalf("custom_issue_statuses: want unpublished, got %v", cfg.FeatureFlags["custom_issue_statuses"])
+ }
withComposioMCPAppsFlag(t, h, true)
w = httptest.NewRecorder()
diff --git a/server/internal/handler/daemon.go b/server/internal/handler/daemon.go
index 7b0a7cacda..208dbbf2db 100644
--- a/server/internal/handler/daemon.go
+++ b/server/internal/handler/daemon.go
@@ -3044,12 +3044,9 @@ func (h *Handler) buildClaimedTaskResponse(r *http.Request, task *db.AgentTaskQu
}
// Workspace status catalog (MUL-6460): active CUSTOM statuses only, so the
- // daemon can render them into the brief's status-command line. Not gated on
- // the custom_issue_statuses flag — the flag only guards creation, and a
- // catalog written before a flag flip must stay visible to agents as long as
- // issues can sit on it. Read on every claim, like the agent row, so an
- // admin's edit lands on the next task. Failure degrades to the built-in-only
- // brief rather than failing the claim.
+ // daemon can render them into the brief's status-command line. Read on every
+ // claim, like the agent row, so an admin's edit lands on the next task.
+ // Failure degrades to the built-in-only brief rather than failing the claim.
if entries, err := h.Queries.ListIssueStatusEntries(r.Context(), db.ListIssueStatusEntriesParams{
WorkspaceID: parseUUID(resp.WorkspaceID),
IncludeArchived: false,
diff --git a/server/internal/handler/featureflag_test.go b/server/internal/handler/featureflag_test.go
index 3f7c2edee3..683f159849 100644
--- a/server/internal/handler/featureflag_test.go
+++ b/server/internal/handler/featureflag_test.go
@@ -15,10 +15,6 @@ func withPluginsV1Flag(t *testing.T, h *Handler, enabled bool) {
withFeatureFlag(t, h, featureflags.PluginsV1, enabled)
}
-func withCustomIssueStatusesFlag(t *testing.T, h *Handler, enabled bool) {
- withFeatureFlag(t, h, featureflags.CustomIssueStatuses, enabled)
-}
-
func withFeatureFlag(t *testing.T, h *Handler, key string, enabled bool) {
t.Helper()
provider := featureflag.NewStaticProvider()
diff --git a/server/internal/handler/issue_status.go b/server/internal/handler/issue_status.go
index 781010c0ed..fb5cdd4e24 100644
--- a/server/internal/handler/issue_status.go
+++ b/server/internal/handler/issue_status.go
@@ -10,7 +10,6 @@ import (
"github.com/go-chi/chi/v5"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
- "github.com/multica-ai/multica/server/internal/featureflags"
"github.com/multica-ai/multica/server/internal/issuestatus"
"github.com/multica-ai/multica/server/internal/logger"
"github.com/multica-ai/multica/server/internal/util"
@@ -131,15 +130,6 @@ func (h *Handler) CreateIssueStatus(w http.ResponseWriter, r *http.Request) {
return
}
- // Rollout gate (see featureflags.CustomIssueStatuses). Creating the first
- // custom status mints a value older pods cannot interpret, so it stays
- // closed until the whole fleet is running code that resolves categories.
- // Only creation is gated — reading and resolving are safe unconditionally.
- if !featureflags.CustomIssueStatusesEnabled(r.Context(), h.FeatureFlags) {
- writeError(w, http.StatusForbidden, "custom issue statuses are not enabled for this deployment")
- return
- }
-
var req CreateIssueStatusRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
writeError(w, http.StatusBadRequest, "invalid request body")
diff --git a/server/internal/handler/issue_status_test.go b/server/internal/handler/issue_status_test.go
index 79d4df39a3..9fbe662b6a 100644
--- a/server/internal/handler/issue_status_test.go
+++ b/server/internal/handler/issue_status_test.go
@@ -329,7 +329,6 @@ func TestArchiveRetiresStatusWithoutTouchingExistingIssues(t *testing.T) {
// TestCreateIssueStatusValidation covers the reserved-key and category rules.
func TestCreateIssueStatusValidation(t *testing.T) {
seedTestCatalog(t)
- withCustomIssueStatusesFlag(t, testHandler, true)
cases := []struct {
name string
@@ -354,27 +353,20 @@ func TestCreateIssueStatusValidation(t *testing.T) {
}
}
-// TestCreateIssueStatusIsGatedOnRollout pins the rollout gate. Creating the
-// first custom status mints a value older pods cannot interpret, so it must be
-// impossible until the whole fleet is on this code. Reads stay open.
-func TestCreateIssueStatusIsGatedOnRollout(t *testing.T) {
+// TestCreateIssueStatusIsNotGatedOnRollout pins the removal of the rollout gate
+// (MUL-6643). Creation used to 403 unless a feature flag was flipped on, because
+// the first custom status minted a value older pods could not interpret. Every
+// pod resolves categories now, so an unset flag must not be able to take the
+// feature away again — creation answers to workspace role alone.
+func TestCreateIssueStatusIsNotGatedOnRollout(t *testing.T) {
seedTestCatalog(t)
- withCustomIssueStatusesFlag(t, testHandler, false)
- rec := httptest.NewRecorder()
- testHandler.CreateIssueStatus(rec, newRequest(http.MethodPost, "/api/issue-statuses", map[string]any{
- "name": "Human Review", "category": "in_review", "color": "#123456",
- }))
- if rec.Code != http.StatusForbidden {
- t.Fatalf("expected 403 while the rollout gate is closed, got %d: %s", rec.Code, rec.Body.String())
- }
-
- // Reading the catalog is never gated — clients need it to render statuses.
- listRec := httptest.NewRecorder()
- testHandler.ListIssueStatuses(listRec, newRequest(http.MethodGet, "/api/issue-statuses", nil))
- if listRec.Code != http.StatusOK {
- t.Fatalf("listing must stay open while the gate is closed, got %d: %s", listRec.Code, listRec.Body.String())
- }
+ var created IssueStatusResponse
+ testutil.Call(t, testHandler.CreateIssueStatus,
+ newRequest(http.MethodPost, "/api/issue-statuses", map[string]any{
+ "name": "Human Review", "category": issuestatus.InReview, "color": "#123456",
+ })).Want(http.StatusCreated).JSON(&created)
+ dbfx.Cleanup(t, `DELETE FROM issue_status WHERE id = $1`, parseUUID(created.ID))
}
// TestIssueWriteStoresCanonicalStatusKey guards the 500 found in review:
@@ -1246,7 +1238,6 @@ func TestBackgroundEventCarriesCustomStatusCategory(t *testing.T) {
func TestCatalogWritesAnnounceThemselves(t *testing.T) {
ctx := context.Background()
seedTestCatalog(t)
- withCustomIssueStatusesFlag(t, testHandler, true)
changes := make(chan events.Event, 8)
testHandler.Bus.Subscribe(protocol.EventIssueStatusChanged, func(e events.Event) {