Skip to content

feat: redesign automation connect UX with silent connect and self-renewal - #16

Merged
LukasHirt merged 14 commits into
mainfrom
feature/automation-connect-ux
Jul 24, 2026
Merged

feat: redesign automation connect UX with silent connect and self-renewal#16
LukasHirt merged 14 commits into
mainfrom
feature/automation-connect-ux

Conversation

@LukasHirt

Copy link
Copy Markdown
Collaborator

Summary

Replaces the manual "Connect automation" button with a silent, self-healing flow:

  • Backend: a self-renewal job (pkg/automation/renew.go) periodically renews any stored app-password within 14 days of its 90-day expiry, authenticating with the app-password itself via Basic auth (same convention as the scheduler) — no live user session required, so background execution never lapses as long as renewal keeps succeeding.
  • Frontend: WorkflowBuilder.vue silently connects automation when activating a schedule/event-triggered workflow (blocking the save if connecting fails); WorkflowList.vue self-heals on mount if an active automated workflow exists but automation isn't connected. The header pill/button is replaced by a quiet status line + a "manage" panel (status, expiry, disconnect with a confirmation warning).
  • A one-time toast notifies the user when automation gets connected.

Full design rationale and open questions: docs/superpowers/specs/2026-07-24-automation-connect-ux-design.md
Implementation plan: docs/superpowers/plans/2026-07-24-automation-connect-ux.md

Two issues were found and fixed during implementation, beyond the original plan:

  • WorkflowBuilder.vue's save() used to show the success toast before the workflow was actually persisted — navigating away right after seeing it could abort the in-flight save and silently lose the change. Fixed by splitting useAutomationConnect's connectWithNotice() into connect() (no toast) + notifyConnected() (toast only), and reordering save() to persist first, notify after.
  • Service.Status never checked whether a stored credential's expiry had already passed, so a credential that lapsed in place (e.g. renewal failing for the whole 14-day window) still reported connected: true, defeating the frontend's self-heal. Fixed by treating a past ExpiresAt as disconnected.

Known, accepted limitation (documented in the plan, not a regression): the connect toast isn't reliably observable when creating a brand-new schedule/event workflow from scratch, since save immediately hard-navigates to the new workflow's URL. It is observable when editing an existing workflow to add such a trigger — that's the path the e2e test exercises.

Test plan

  • Backend: go build ./... && go vet ./... && go test ./... (from backend/) — all green, including new tests for the renewal job and the expiry-aware status check.
  • Frontend: pnpm test:unit && pnpm check:types && pnpm lint — all green.
  • Frontend e2e: pnpm test:e2e (all 4 specs) — all green, including a rewritten automation.spec.ts exercising the full silent-connect/self-heal/disconnect flow with zero manual "connect" button clicks.
  • Self-renewal mechanism (app-password minting its own replacement via Basic auth) manually verified against a live owncloud/ocis-rolling:latest stack before implementation began.

🤖 Generated with Claude Code

@LukasHirt
LukasHirt requested a review from a team as a code owner July 24, 2026 15:24
LukasHirt and others added 14 commits July 24, 2026 17:27
Removes the manual "Connect automation" step in favor of silent
connect-on-activation, with a one-time consent toast, silent proactive
renewal, and a quieter status/manage affordance.

Signed-off-by: Lukas Hirt <info@hirt.cz>
Page-load-piggybacked renewal only covered users who revisit the
Workflows app; a periodic job using the scheduler's existing
Basic-auth-with-app-password pattern renews indefinitely with no live
session required. Also corrects a wrong assumption that oCIS core
ships a native app-password management UI.

Signed-off-by: Lukas Hirt <info@hirt.cz>
Empirically confirmed against owncloud/ocis-rolling:latest that an
app-password can mint its own replacement via Basic auth, and traced
why through the reva/auth-app source. Also notes a DELETE /auth-app/tokens
500 quirk observed during testing, unrelated to this design.

Signed-off-by: Lukas Hirt <info@hirt.cz>
Seven-task plan covering the backend self-renewal job and server
wiring, then the frontend composable, panel, view rewrites, and
e2e test rewrite, per the approved design spec.

Signed-off-by: Lukas Hirt <info@hirt.cz>
…elopment

Signed-off-by: Lukas Hirt <info@hirt.cz>
Signed-off-by: Lukas Hirt <info@hirt.cz>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Lukas Hirt <info@hirt.cz>
Signed-off-by: Lukas Hirt <info@hirt.cz>
…age panel

Signed-off-by: Lukas Hirt <info@hirt.cz>
…e/event workflow

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt
LukasHirt force-pushed the feature/automation-connect-ux branch from 61abb1a to 5510cca Compare July 24, 2026 15:29
@LukasHirt LukasHirt self-assigned this Jul 24, 2026
@LukasHirt LukasHirt changed the title Redesign automation connect UX: silent connect, self-renewal, no manual button feat: redesign automation connect UX with silent connect and self-renewal Jul 24, 2026
@LukasHirt
LukasHirt merged commit 2ce441b into main Jul 24, 2026
5 checks passed
@LukasHirt
LukasHirt deleted the feature/automation-connect-ux branch July 24, 2026 20:40
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.

2 participants