AINATIVEM-44 app extensions: ComposeBuilder, panel SDK demo, env-driven config #64
Annotations
2 errors and 1 warning
|
ci
Process completed with exit code 1.
|
|
src/generators/node/appExtensions.test.ts > generateAppExtensions > omits modal close/open actions from panel-only output:
src/generators/node/appExtensions.test.ts#L156
AssertionError: expected 'import { useEffect } from \'react\';\…' not to contain '@pipedrive/app-extensions-sdk'
- Expected
+ Received
- @pipedrive/app-extensions-sdk
+ import { useEffect } from 'react';
+ import { Command, Modal } from '@pipedrive/app-extensions-sdk';
+ import { usePipedriveSdk } from '../shared/pipedriveSdk';
+
+ function formatQueryValue(key: string, value: string): string {
+ return /token|secret|code/i.test(key) ? 'Present' : value;
+ }
+
+ function formatData(data: unknown): string {
+ if (data === null || data === undefined || data === '') return 'None';
+ if (typeof data === 'string') return data;
+ return JSON.stringify(data, null, 2);
+ }
+
+ export default function Panel() {
+ const {
+ context,
+ status,
+ theme,
+ visibility,
+ pageState,
+ lastAction,
+ signedTokenPreview,
+ isReady,
+ runSdkAction,
+ actions,
+ } = usePipedriveSdk('panel');
+ const queryEntries = Object.entries(context.query);
+
+ useEffect(() => {
+ document.title = 'Custom Panel';
+ }, []);
+
+ async function logActivity(): Promise<void> {
+ const dealId = context.query.selectedIds
+ ? parseInt(context.query.selectedIds)
+ : undefined;
+ await runSdkAction('Activity logged', (client) =>
+ client.execute(Command.OPEN_MODAL, {
+ type: Modal.ACTIVITY,
+ prefill: {
+ subject: 'Follow-up',
+ ...(dealId ? { deal: dealId } : {}),
+ },
+ }),
+ );
+ }
+
+ if (!isReady && status !== 'Local preview') {
+ return (
+ <main className="app">
+ <header className="topbar">
+ <div>
+ <span className="surface-label">Custom Panel</span>
+ <h1>Pipedrive App Extension</h1>
+ </div>
+ <span className="status">{status}</span>
+ </header>
+ </main>
+ );
+ }
+
+ return (
+ <main className="app">
+ <header className="topbar">
+ <div>
+ <span className="surface-label">Custom Panel</span>
+ <h1>Pipedrive App Extension</h1>
+ </div>
+ <span className={isReady ? 'status status--ready' : 'status'}>
+ {status}
+ </span>
+ </header>
+
+ <section className="summary-grid" aria-label="Extension state">
+ <div className="stat">
+ <span>Theme</span>
+ <strong>{theme}</strong>
+ </div>
+ <div className="stat">
+ <span>Extension</span>
+ <strong>{visibility}</strong>
+ </div>
+ <div className="stat">
+ <span>Page</span>
+ <strong>{pageState}</strong>
+ </div>
+ <div className="stat">
+ <span>Token</span>
+ <strong>{context.tokenPresent ? 'Present' : 'Absent'}</strong>
+ </div>
+ </section>
+
+ <section className="toolbar" aria-label="SDK actions">
+ <button type="button" disabled={!isReady} onClick={logActivity}>
+ Log activity
+ </button>
+ <button
+ type="button"
+ disabled={!isReady}
+ onClick={actions.showSnackbar}
+ >
+ Snackbar
+ </button>
+ <button
+ type="button"
+ className="secondary"
+ disabled={!isReady}
+ onClick={actions.showConfirmation}
+ >
+ Confirm
+ </button>
+ <button
+ type="button"
+ className="ghost"
+ disabled={!isReady}
+ onClick={actions.resize}
+ >
+ {actions.isExpanded ? 'Collapse panel' : 'Expand panel'}
+ </button>
+ <button
+ type="button"
+ className="ghost"
+ disabled={!isReady}
+ onClick={actions.getSignedToken}
+ >
+ Get token
+ </button>
+ </section>
+
+ <section className="content-grid">
+ <article className="panel">
+ <h2>Iframe context</h2>
+ {queryEntries.length > 0 ? (
+ <dl className="k
|
|
ci
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, actions/setup-node@v4. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
|