Skip to content

Update documentation for interactive dialog#1498

Merged
sbishel merged 6 commits intomasterfrom
fix-interactive-dialog
Mar 26, 2026
Merged

Update documentation for interactive dialog#1498
sbishel merged 6 commits intomasterfrom
fix-interactive-dialog

Conversation

@sbishel
Copy link
Copy Markdown
Member

@sbishel sbishel commented Mar 18, 2026

Summary

Update the documentation for new interactive dialog features

Ticket Link

Fixes mattermost/mattermost#35586

Summary by CodeRabbit

  • Documentation
    • Updated interactive dialog configuration and field refresh documentation to reflect revised API structures and request/response handling models.
    • Enhanced multi-step dialog workflow documentation with details on new submission patterns and dialog progression across steps.
    • Revised dynamic lookup interaction workflow documentation with updated payload structures and server response handling.

@github-actions
Copy link
Copy Markdown

Newest code from mattermost has been published to preview environment for Git SHA 308dd54

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Walkthrough

This pull request updates the interactive dialogs developer documentation to replace fictional API parameters (is_multistep, refresh_on_select) with actual API implementation details, including corrected payload structures for dialog lookups, field refresh requests, and multi-step workflows with proper type fields and submission objects.

Changes

Cohort / File(s) Summary
Interactive Dialogs Documentation
site/content/integrate/plugins/interactive-dialogs/_index.md
Replaces fictional configuration flags (is_multistep, refresh_on_select) with real API behavior. Updates dialog lookup payload to use type: dialog_lookup with nested submission object. Updates field refresh to use type: refresh with source_url and current values. Revises multi-step workflow to use type: dialog_submission with form responses containing next steps and accumulated values. Corrects example JSON structures and descriptive text throughout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • #35586 — Directly addresses the core issue of replacing fictional is_multistep and refresh_on_select parameters with correct API implementations (source_url, element-level refresh flags, proper payload types), validating and correcting the AI-generated documentation against actual API specifications.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Update documentation for interactive dialog' accurately summarizes the primary change, which is updating the interactive dialogs documentation with corrected information.
Linked Issues check ✅ Passed The PR addresses issue #35586 by replacing fictional parameters (is_multistep, refresh_on_select) with real API structures (source_url, refresh flag) and correcting the dynamic dialog workflow documentation.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the interactive dialogs documentation as described in issue #35586; no unrelated changes were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-interactive-dialog
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can validate your CodeRabbit configuration file in your editor.

If your editor has YAML language server, you can enable auto-completion and validation by adding # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json at the top of your CodeRabbit configuration file.

coderabbitai[bot]
coderabbitai bot previously requested changes Mar 18, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
site/content/integrate/plugins/interactive-dialogs/_index.md (1)

131-131: ⚠️ Potential issue | 🟡 Minor

Fix typo: "texareat" should be "textarea".

📝 Proposed fix
-| `type`         | String  | Set this value to `texareat` for a textarea element.                                                                                                                             |
+| `type`         | String  | Set this value to `textarea` for a textarea element.                                                                                                                             |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@site/content/integrate/plugins/interactive-dialogs/_index.md` at line 131,
Replace the typo in the table row for the `type` field where the value is
mistakenly written as `texareat`; change it to `textarea` so the description
correctly reads "Set this value to `textarea` for a textarea element" (update
the markdown table entry that references the `type` field).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@site/content/integrate/plugins/interactive-dialogs/_index.md`:
- Line 39: Replace the incorrect `source_url` parameter with the correct `url`
parameter everywhere in this document (the table row referencing `source_url`
and any examples/snippets that use `source_url`), update the description to
state that `url` is the endpoint used for dialog submission payloads and for
field refresh requests, and clarify that select elements must set
`refresh_on_select: true` (and that Mattermost sends a `dialog_field_refresh`
payload to the `url` endpoint) so examples and the parameter table match the
official Mattermost interactive dialogs API.
- Around line 219-238: Update the example and explanatory text for dynamic
select lookups so it matches Mattermost's actual POST to your data_source_url:
replace the incorrect SubmitDialogRequest-style payload (removing type, url,
callback_id, state and the nested submission/query/selected_field entries) with
the simpler payload that includes user_id, channel_id, team_id and the optional
term (the user's search input); explicitly call out that Mattermost sends only
those top-level fields for dynamic selects and clarify that other dialog fields
are not included in this lookup request.

---

Outside diff comments:
In `@site/content/integrate/plugins/interactive-dialogs/_index.md`:
- Line 131: Replace the typo in the table row for the `type` field where the
value is mistakenly written as `texareat`; change it to `textarea` so the
description correctly reads "Set this value to `textarea` for a textarea
element" (update the markdown table entry that references the `type` field).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9a89e6a7-ad6b-4d07-838e-500f072d46cb

📥 Commits

Reviewing files that changed from the base of the PR and between 9dce681 and 308dd54.

📒 Files selected for processing (1)
  • site/content/integrate/plugins/interactive-dialogs/_index.md

Comment thread site/content/integrate/plugins/interactive-dialogs/_index.md
Comment thread site/content/integrate/plugins/interactive-dialogs/_index.md
@sbishel sbishel dismissed coderabbitai[bot]’s stale review March 18, 2026 21:02

CodeRabbit is looking at the old "interactive_dialog" api, not the latest AppsForm APIs.

@sbishel sbishel requested a review from calebroseland March 18, 2026 21:13
Copy link
Copy Markdown
Member

@calebroseland calebroseland left a comment

Choose a reason for hiding this comment

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

LGTM. but one question in the dynamic field refresh section.

1. Set `refresh: true` on the **element** that should trigger refreshes when its value changes.
2. Set `source_url` on the **dialog** to specify where refresh requests are sent.

When a user changes a select element that has `refresh: true`, Mattermost sends a request to the dialog's `source_url` via the `/api/v4/actions/dialogs/submit` endpoint.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this be lookup instead of submit?

Suggested change
When a user changes a select element that has `refresh: true`, Mattermost sends a request to the dialog's `source_url` via the `/api/v4/actions/dialogs/submit` endpoint.
When a user changes a select element that has `refresh: true`, Mattermost sends a request to the dialog's `source_url` via the `/api/v4/actions/dialogs/lookup` endpoint.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks @calebroseland - "submit" is correct...though I did double check. The /api/v4/actions/dialogs/lookup endpoint is for dynamic select field lookups (when data_source: 'dynamic' and the user types to search for options)

@sbishel
Copy link
Copy Markdown
Member Author

sbishel commented Mar 25, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@sbishel
Copy link
Copy Markdown
Member Author

sbishel commented Mar 26, 2026

/update-branch

@mattermost-build
Copy link
Copy Markdown
Contributor

Error trying to update the PR.
Please do it manually.

@github-actions
Copy link
Copy Markdown

Newest code from mattermost has been published to preview environment for Git SHA d5a4945

@sbishel sbishel merged commit 0abe0df into master Mar 26, 2026
5 checks passed
@sbishel sbishel deleted the fix-interactive-dialog branch March 26, 2026 16:01
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.

Developer documentation for interactive dialogs partially generated by Claude without validation

3 participants