AINATIVEM-44 app extensions: ComposeBuilder, panel SDK demo, env-driven config#11
Merged
Conversation
- resize now toggles between initial and expanded sizes; clicking again collapses back - button label updates to "Expand panel/modal" / "Collapse panel/modal" - open modal handler gets a comment pointing to Developer Hub action_id config
…, redirect on submit
…ent deal from context
There was a problem hiding this comment.
Pull request overview
This PR updates the generated Node app-extension experience by wiring environment-driven modal configuration, adding panel SDK demo actions, and improving resize behavior.
Changes:
- Adds
VITE_CUSTOM_MODAL_ACTION_IDsupport and Vite root.envloading for generated app-extension UI. - Adds app-extension UI Docker Compose env loading.
- Updates generated panel/modal SDK demo UI with activity logging and expand/collapse labels.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/generators/node/projectBuilder.ts |
Documents the custom modal action ID env variable in generated .env.example. |
src/generators/node/database.ts |
Passes .env into the generated app-extension UI Docker Compose service. |
src/generators/node/appExtensions/sdk.ts |
Tracks resize expanded/collapsed state in the generated SDK wrapper. |
src/generators/node/appExtensions/frontend.ts |
Uses env-driven custom modal IDs and adds panel activity logging plus resize labels. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+197
to
206
| const nextExpanded = !isExpanded; | ||
| const size = surface === 'modal' | ||
| ? (nextExpanded ? { height: 480, width: 720 } : { height: 420, width: 640 }) | ||
| : (nextExpanded ? { height: 420 } : { height: 360 }); | ||
| await runSdkAction(nextExpanded ? 'Expanded' : 'Collapsed', (client) => | ||
| client.execute(Command.RESIZE, size), | ||
| ); | ||
| setIsExpanded(nextExpanded); | ||
| }, [runSdkAction, surface, isExpanded]); | ||
|
|
|
|
||
| async function logActivity(): Promise<void> { | ||
| const dealId = context.query.selectedIds ? parseInt(context.query.selectedIds) : undefined; | ||
| await runSdkAction('Activity logged', (client) => |
Comment on lines
181
to
+184
| client.execute(Command.OPEN_MODAL, { | ||
| type: Modal.CUSTOM_MODAL, | ||
| action_id: 'custom-modal', | ||
| // Replace with your Custom Modal's "Extension identifier" from Marketplace Developer Hub → App Extensions | ||
| action_id: import.meta.env.VITE_CUSTOM_MODAL_ACTION_ID, |
Comment on lines
+226
to
+227
| client.execute(Command.OPEN_MODAL, { | ||
| type: Modal.ACTIVITY, |
…m-modal exclusion instead
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ComposeBuilderclass that serializes once via theyamlpackage — consistent with the existingNodeProjectBuilderpatternLog activitybutton to the panel that opens Pipedrive's native activity creation dialog pre-filled with the current deal from iframe context (selectedIds)action_idfromVITE_CUSTOM_MODAL_ACTION_IDenv var instead of a hardcoded placeholder;.env.exampledocuments it;envDirin vite config points to project root;app-extension-uidocker-compose service getsenv_fileENCRYPTION_KEY) to the generated OAuth token repositoryTest plan
docker-compose up --watch— confirm stack starts and OAuth flow worksVITE_CUSTOM_MODAL_ACTION_IDappears in.env.exampleVITE_CUSTOM_MODAL_ACTION_IDis set correctly in.env