Draft: [PoC] Duo × Slack AI-native live progress (research/exploration)
⚠️ PoC / AI research — not for merge as-is
This is an AI-assisted research spike exploring how to make the GitLab Duo Slack integration feel "AI-native" using Slack's newer agent UI primitives. It is intended as a reference for the ideas and the verified Slack capabilities — to be split into smaller, production-hardened MRs before shipping.
Labelled type::ignore.
What it does
Replaces the "
- an animated rotating status (
assistant.threads.setStatus+loading_messages), - the agent's live todo plan as a native Slack plan block (task cards), and
- the final answer, edited into the same message.
All on the existing channel @mention surface with only the chat:write scope — no assistant:write, no assistant-thread surface, no manifest re-consent.
Design / the spine
The value here is a generic, surface-agnostic progress spine that lets us upgrade the rendering later (e.g. token streaming) without rethinking the mechanism:
ProgressHeartbeatWorker— generic, self-rescheduling, per-workflow progress loop. Pacing cadence is an adapter property (progress_interval); the worker owns only the mechanism. No change to the global checkpoint write path.- Slack adapter —
setStatusrotating indicator (with fallback opener), native plan block rendered lazily then edited in place, subtle session-link footer. - Terminal delivery stays on
Gitlab::EventStore(CallbackWorker), now reliable (raises → Sidekiq retry) and idempotent (final_delivered). Checkpoint#ui_chat_log— single reader of the checkpoint log path (also adopted by the presenter and mailer).
Full write-up, the Slack surface/method table, deferred items and the suggested MR split: slack_exploration/live-progress-design.md (in this MR).
Deferred (intentionally)
Change-detection cursor, self-healing cron reconciler, Retry-After precision, semantic lifecycle hooks, and the assistant:write streaming/assistant surface.
Tests
Specs for the heartbeat worker, Slack adapter, CallbackWorker (reliability + idempotency), Checkpoint#ui_chat_log, and the Slack::API additions.
Notes before production
- Behind the existing
slack_duo_agentfeature flag. MAX_LIFETIMEheartbeat cap is a placeholder pending the CI workload timeout.- Confirm the checkpoint payload stays whole through the incremental/diff checkpoint work, or update the single
Checkpoint#ui_chat_logaccessor. - Suggested split: (a)
ui_chat_logaccessor refactor, (b) terminal reliability, (c) the live-progress feature.