Skip to content

feat(company-os): CompanyWorkflowCreateModal and RolesView attach picker gated by viewer_can_manage (#14409) #21241

Closed

Description

@mrveiss

Parent: #14409. Blocked by #21240. Must land after PR #21198, which touches the same files (RolesView.vue).

Problem

The role detail view has no way to create a workflow, attaches by free-text id, and shows mutation controls to viewers who cannot use them (autobot-frontend/src/views/llc/RolesView.vue:18-24, :158-168).

Scope

  • New kit-based CompanyWorkflowCreateModal component.
  • RolesView.vue: attach picker with real options, controls hidden unless viewer_can_manage (maintainer decision 2026-11-09, like the org chart), create-then-attach (maintainer decision), explicit empty and unavailable states.
  • i18n strings in all locale files. Only the controls this work touches move to kit components.
  • RolesView.vue is under a shrink-only line ratchet: net change must be <= 0 lines (extract logic into the composable/modal).

Acceptance criteria

  • A company admin creates a workflow in the modal and it is attached to the role in one flow
  • The attach control is a picker over attachable workflows, not a free-text id
  • Mutation controls are hidden when viewer_can_manage is false
  • Empty (nothing attachable) and unavailable (load failed) states are distinct and shown
  • Owner decision 2026-11-21: per-locale translation dropped; strings are i18n keys in the English locale with English fallback, translatable later. No hardcoded UI strings.
  • RolesView.vue net line change <= 0

Tests

Vitest: modal create-then-attach, viewer hides controls, empty vs unavailable, locale-key parity check.

Activity

  1. added
    bugSomething isn't working
    area: company-osWave 4 · cluster A — Company OS & LLC canvas
    phase:M3.7Company OS, Automation and BI screens
    on Nov 9, 2026
  2. mrveiss commented on Nov 13, 2026

    @mrveiss
    OwnerAuthor

    Status from PR #21458 (not merged yet): every acceptance criterion here is delivered in that PR except 'strings in every locale file'. The PR adds the new strings to the English locale only, following the repository's locale policy (new keys land in English; other locales may lag and fall back to English at runtime — see the docstring of repo_tests/i18n_untranslated_ratchet_test.py, owner rule dated 2026-10-18, and locale_completeness_allow_missing_18922_test.py). That criterion is deliberately left unticked, so the PR says Refs, not Closes. Closing this issue needs an owner decision: amend the criterion to English-only, or add the strings to the other ten locale files.

  3. github-actions commented on Nov 13, 2026

    @github-actions
    Contributor

    Landed via the merge train (#21475, merge 1ccdc9655d) via #21458

  4. mrveiss commented on Nov 13, 2026

    @mrveiss
    OwnerAuthor

    Landed in #21458 (merge 1ccdc96)

    PR keyword: Refs, so this issue stays open. Evidence from origin/main.

    Criterion Evidence Ticked
    Admin creates a workflow in the modal and it is attached in one flow components/llc/CompanyWorkflowCreateModal.vue:6,29 (create, then attach when roleId given); mounted at components/llc/RoleWorkflowsPanel.vue:183, panel mounted at views/llc/RolesView.vue:159; test __tests__/RoleWorkflowsPanel.test.ts:210 yes
    Attach control is a picker, not free text RoleWorkflowsPanel.vue:157 BaseSelectMenu over options yes
    Mutation controls hidden when viewer_can_manage is false RoleWorkflowsPanel.vue:44,127,154,184 (viewerCanManage); test RoleWorkflowsPanel.test.ts:150 yes
    Empty and unavailable states distinct RoleWorkflowsPanel.vue:143 (role-workflows-unavailable) vs :173 (role-workflows-nothing-attachable); tests :169, :183 yes
    All new strings in every locale file only autobot-frontend/src/i18n/locales/en.json gained keys in #21458 (+25); e.g. llc.workflows.newWorkflow and llc.orgChart.processNothingAttachable are absent from the other ten locale files no: deliberately unmet under the English-only locale policy; owner decision pending
    RolesView.vue net line change <= 0 1026 lines before the train, 1015 on main yes

    Remaining

    The every-locale-file criterion, pending the owner's decision on the locale policy. Parent: #14409.

  5. mrveiss commented on Nov 21, 2026

    @mrveiss
    OwnerAuthor

    Locale criterion amended and verified (owner decision 2026-11-21)

    Per-locale translation is dropped. Each new string is an i18n key, defined in en.json (the llc.workflows block, autobot-frontend/src/i18n/locales/en.json:9508-9527), with an English fallback.

    Key (llc.workflows.*) Use site (autobot-frontend/src/components/llc/)
    createTitle, fieldId, idHint, fieldName CompanyWorkflowCreateModal.vue:141,153,154,162
    working, attachCreated, createAndAttach CompanyWorkflowCreateModal.vue:60,61,62
    createForbidden, createFailed, attachCreatedFailed CompanyWorkflowCreateModal.vue:91,92,98
    newWorkflow RoleWorkflowsPanel.vue:169
    loading, unavailable, standingUnavailable RoleWorkflowsPanel.vue:141,144,151
    pickerLabel, pickerPlaceholder RoleWorkflowsPanel.vue:160,161
    nothingAttachable, allAttached RoleWorkflowsPanel.vue:178

    No hardcoded UI strings: a scan of the templates and scripts of CompanyWorkflowCreateModal.vue and RoleWorkflowsPanel.vue finds no English literal rendered to the user; the only literals are a log message (CompanyWorkflowCreateModal.vue:130) and code comments. The detach glyph × carries a translated aria-label (RoleWorkflowsPanel.vue:131).

    English fallback (verified at origin/main @ d8cbd91925):

    Every acceptance criterion is now ticked. Closing.

  6. mrveiss commented on Nov 21, 2026

    @mrveiss
    OwnerAuthor

    Host evidence (install at d8cbd91)

    Checked 2026-11-21 ~21:38 Riga. Deployed commit marker on the install = d8cbd91925a19c7e4bc27696382e8b6a01ef2c0d (= origin/main); backend and SLM backend services active. All checks read-only.

    Commands (generic)

    Results

    Check Result
    PR #21458 files (34), deployed vs origin/main 33/33 shipped files match. The 34th, a repo-only CI script (scripts/frontend_file_size_known_large.py), is not part of the install
    llc.workflows.* English keys (18: newWorkflow, createTitle, fieldId, idHint, fieldName, working, createAndAttach, attachCreated, createForbidden, createFailed, attachCreatedFailed, pickerLabel, pickerPlaceholder, loading, unavailable, nothingAttachable, allAttached, standingUnavailable) 18/18 present with the main-branch English value
    llc.orgChart.* keys added (4: processNodesUnavailable, processNoneAttached, processNothingAttachable, workflowsUnavailable) 4/4 present with the main-branch English value
    Consumers in the bundle llc.workflows.* keys referenced from the built RolesView and OrgChart chunks; CompanyWorkflowCreateModal ships as its own chunk

    Verdict

    Verified for the deployed strings and code. The behavioural ACs (create-and-attach flow, viewer_can_manage gating) were not exercised on the host, because that needs mutating requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: company-osWave 4 · cluster A — Company OS & LLC canvasbugSomething isn't workingfrontendphase:M3.7Company OS, Automation and BI screens

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions