Skip to content

Expand team and template workflows - #5198

Open
klopez4212 wants to merge 3 commits into
mainfrom
kennylopez-create-team-channel-style
Open

Expand team and template workflows#5198
klopez4212 wants to merge 3 commits into
mainfrom
kennylopez-create-team-channel-style

Conversation

@klopez4212

Copy link
Copy Markdown
Contributor

Summary

  • align team creation and snapshot import with established modal patterns
  • add reusable channel and section templates with workspace, worktree, Canvas, agent, and multi-folder defaults
  • render team mentions as one standard chip while notifying every member

Testing

  • desktop checks, typecheck, unit tests, and Tauri checks
  • focused template and team-mention browser coverage

@klopez4212
klopez4212 marked this pull request as ready for review August 7, 2026 16:21
@klopez4212
klopez4212 requested a review from a team as a code owner August 7, 2026 16:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e10cc44ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src/features/messages/lib/mentionCandidates.ts
Comment thread desktop/src/features/settings/ui/ChannelTemplatesSettingsCard.tsx
Comment thread desktop/src/features/messages/lib/mentionCandidates.ts
Comment thread desktop/src/features/agents/ui/useTeamActions.ts
Comment thread desktop/src/features/sidebar/lib/useCreateChannelForm.ts
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
@klopez4212
klopez4212 force-pushed the kennylopez-create-team-channel-style branch from 6e10cc4 to 6036287 Compare August 10, 2026 15:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60362872fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread desktop/src-tauri/src/templates/types.rs
Preserve template channel settings during edits, retain duplicated team metadata, clear deleted section defaults, and reject oversized team mentions before provisioning.

Co-authored-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 696e3c74c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

continue;
}

tags.push([TEAM_MENTION_TAG, candidate.teamId, candidate.displayName]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate team names before preparing mentioned agents

When a locally created team has a name longer than 200 characters, this code emits the name unchanged, but parse_team_mention rejects it at event construction. The send flow creates and starts unresolved persona agents before the event builder parses these tags, so the message fails after leaving agent/channel side effects; enforce the tag constraints when naming teams or preflight the generated team tags before agent preparation.

Useful? React with 👍 / 👎.

style={{
minWidth: "var(--radix-dropdown-menu-trigger-width)",
}}
{form.sectionDefaultTemplateId ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep section creation usable when template loading fails

When a user opens channel creation from a templated section on a fresh session and list_channel_templates fails, sectionDefaultTemplateId remains set because reconciliation only runs after a successful query. This branch therefore replaces the picker with a locked raw template ID, yet submission still creates the channel and applyCanvas/applyAgents silently return without query data, so none of the displayed section defaults are applied; block creation with a retryable error or unlock the template selection when loading fails.

Useful? React with 👍 / 👎.

Comment on lines +74 to +75
#[tauri::command]
pub async fn pick_channel_template_project_folder(app: AppHandle) -> Result<Vec<String>, String> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Document the public folder-picker command

This new public Tauri command has no rustdoc explaining that it opens a multi-folder picker, returns an empty list on user cancellation, and can fail for invalid paths. Add a doc comment before exposing it as part of the command API.

AGENTS.md reference: AGENTS.md:L117-L117

Useful? React with 👍 / 👎.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on Wes's behalf at exact head 696e3c74c0d2886a2fbce982406b1e7491cab456.

Changes requested. The main team/template workflows are thoughtfully covered, and I verified the previous findings for preserving template visibility/type, retaining duplicated team metadata, rejecting >50 mention targets before provisioning, clearing deleted section defaults after a successful fetch, and suppressing ambiguous team autocomplete. However, three user-facing failure paths remain, plus commit attribution.

  1. P2 — invalid team mention metadata is rejected only after agent/channel side effects. create_team and update_team accept any nonblank team name, while parse_team_mention rejects names over 200 characters or containing controls. sendMessageWithMentionFlow preflights only audience cardinality, then may prepare a DM channel and provision/start/attach team agents before buildMentionTags reaches event construction. A locally created/imported team with a >200-character name therefore leaves those side effects and fails to send. Validate team name/tag constraints at team create/import/update time, or preflight the complete generated team tags before onPrepareSendChannel and agent preparation. Existing inline finding: #5198 (comment)

  2. P2 — a section-template fetch failure displays defaults that are not applied. On a fresh session, sectionDefaultTemplateId remains locked while useChannelTemplatesQuery is errored/loading. The form still permits submit; channel creation succeeds with the stale ID, then applyCanvas/applyAgents silently return because query data is unavailable. The UI promised section defaults but created a plain channel. Make the state explicit: block with a retryable template-load error, or unlock/clear the section default on terminal query failure. Existing inline finding: #5198 (comment)

  3. Public API documentation: the new pick_channel_template_project_folder Tauri command lacks the doc comment required by AGENTS.md:114-117. Document its multi-folder behavior, cancellation result, and invalid-path failure contract. Existing inline finding: #5198 (comment)

  4. Commit attribution: final commit 696e3c74c is authored by Fast Fizz and co-authored/signed by Kenny. For agent-implemented block/buzz work, the responsible human must be author and signatory; the implementing agent belongs in Co-authored-by. Rewrite that commit with Kenny as author + Signed-off-by, and Fast Fizz as co-author.

Focused exact-head validation:

  • 50/50 focused desktop unit tests passed (team candidate/resolution, mention-limit preflight, section storage, mention rendering metadata).
  • Full GitHub CI is terminal green/skipped as expected.
  • A focused Tauri Rust test build could not start tests because the fresh worktree lacks generated sidecar desktop/src-tauri/binaries/buzz-acp-aarch64-apple-darwin; this is an environment setup failure, not an assertion failure. CI's Tauri/Rust checks passed.

Behavioral test changes for Wes: this PR substantially expands E2E coverage around team creation/import/mentions and channel/template/section workflows, and adds focused tests for team ambiguity, mention expansion, the 50-target boundary, section template persistence, and team-chip rendering. The existing test changes add new behavior; they do not appear to weaken prior assertions.

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