Skip to content

Enhance Brand Form UI/UX and Fix Workfront Data Persistence#12

Open
davidbenge wants to merge 6 commits intomainfrom
wf-setup
Open

Enhance Brand Form UI/UX and Fix Workfront Data Persistence#12
davidbenge wants to merge 6 commits intomainfrom
wf-setup

Conversation

@davidbenge
Copy link
Copy Markdown
Owner

Enhance Brand Form UI/UX and Fix Workfront Data Persistence

Overview

This PR significantly improves the Brand management form with enhanced UI/UX, fixes critical Workfront data persistence issues, and implements comprehensive validation for Workfront integration fields.

Problem Statement

Data Persistence Issues

  • Workfront configuration (URL, Company, Group) was being lost after saving
  • Data appeared correctly on the wire but didn't persist in the UI
  • List view Workfront column remained empty after updates
  • Reopening the edit form showed blank Workfront fields despite saved data

UI/UX Issues

  • Form layout felt cramped and poorly utilized screen space
  • White background didn't align with header bar (had gaps)
  • Brand metadata displayed as horizontal jumble instead of readable list
  • DropZone for logo upload overflowed its container
  • Workfront fields lacked clear visual hierarchy
  • No indication that Company and Group were required when URL was provided

Solution

🔧 Data Persistence Fixes

Root Cause: DemoBrandManager.getBrandFromJson() and createBrand() weren't mapping Workfront fields when creating Brand instances from API responses.

Fix:

// Added Workfront field mapping in DemoBrandManager
return new Brand({
    // ... existing fields ...
    workfrontServerUrl: json.workfrontServerUrl,
    workfrontCompanyId: json.workfrontCompanyId,
    workfrontCompanyName: json.workfrontCompanyName,
    workfrontGroupId: json.workfrontGroupId,
    workfrontGroupName: json.workfrontGroupName,
    workfrontEventSubscriptions: json.workfrontEventSubscriptions
});

🎨 UI/UX Improvements

Layout Enhancement

  • Changed container width from size-5000 to size-6000 for better space utilization
  • Added full-width gray-50 background aligned with header bar (no gaps)
  • Removed horizontal centering for left-aligned content layout
  • Increased padding from size-200 to size-400 for better spacing

Workfront Section Refactor

  • Implemented vertical stacking with Flex direction="column"
  • Added consistent size-200 gap between fields
  • Set width="100%" on all fields for proper container spanning
  • Auto-load companies and groups when opening edit form with existing data
  • Added dynamic required indicators (Company/Group required when URL provided)

Validation Enhancement

// Workfront validation with dynamic requirements
if (formData.workfrontServerUrl?.trim()) {
    if (!formData.workfrontCompanyId) {
        newErrors.workfrontCompanyId = 'Workfront Company is required when Server URL is provided';
    }
    if (!formData.workfrontGroupId) {
        newErrors.workfrontGroupId = 'Workfront Group is required when Server URL is provided';
    }
}
  • Inline validation error display on Picker components
  • Auto-clear errors when user makes selections
  • Clear all Workfront errors when URL is removed

Visual Improvements

  • Fixed brand metadata display (vertical stack with bold labels)
  • Fixed DropZone overflow with proper styling and constraints
  • Better visual hierarchy throughout the form

Files Changed

Core Logic

  • src/dx-excshell-1/web-src/src/utils/DemoBrandManager.ts - Added Workfront field mapping
  • src/dx-excshell-1/web-src/src/components/layout/BrandForm.tsx - Complete UI/UX refactor
  • src/dx-excshell-1/web-src/src/components/layout/BrandManagerView.tsx - Updated state management

Backend

  • src/actions/classes/BrandManager.ts - Enhanced brand management
  • src/actions/services/workfront/WorkfrontClient.ts - Improved Workfront API client
  • src/actions/services/workfront/list-workfront-companies/index.ts - Updated company listing
  • src/actions/services/workfront/list-workfront-groups/index.ts - Updated group listing

Documentation

  • docs/cursor/WORKFRONT_DATA_PERSISTENCE_FIX.md - Comprehensive fix documentation
  • docs/apis/workfront/groups/groups_response.json - API response examples

Cleanup

  • Deleted src/dx-excshell-1/web-src/src/components/modals/WorkfrontConfigModal.tsx - Replaced with inline form

Testing Performed

✅ Data Persistence

  • Save Workfront configuration and verify data appears in list view
  • Refresh page and confirm Workfront column still shows data
  • Reopen edit form and verify all Workfront fields populate correctly
  • Update Workfront data and confirm changes persist

✅ Validation

  • Enter Workfront URL without Company - validation error appears
  • Select Company - error clears automatically
  • Try to save without Group - validation error appears
  • Clear Workfront URL - all errors clear

✅ Layout

  • Form has appropriate width (not too wide or narrow)
  • Background aligns with header bar (no gaps)
  • Content is left-aligned (not centered)
  • All sections have consistent spacing

✅ Workfront Integration

  • Fields stack vertically (URL → Company → Group)
  • Companies load when URL is entered
  • Groups load when URL is entered
  • When opening edit with existing data, dropdowns populate
  • Required indicators show when URL is present

Screenshots

Before

  • Cramped layout with poor spacing
  • Workfront data not persisting
  • Horizontal metadata jumble
  • DropZone overflow

After

  • Spacious, professional layout
  • Workfront data persists correctly
  • Clean vertical metadata display
  • Contained DropZone with proper styling

Breaking Changes

None - all changes are backward compatible.

Deployment Notes

  • No database migrations required
  • No environment variable changes
  • Frontend-only changes (rebuild and redeploy required)

Related Issues

Fixes issues with:

  • Workfront data not persisting after save
  • List view not updating with Workfront information
  • Edit form showing blank Workfront fields
  • Poor form layout and user experience

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No linter errors
  • Tested in development environment
  • Documentation updated
  • Deployed and verified in staging

Reviewers

Please verify:

  1. Workfront data persists correctly through save/refresh cycle
  2. Form layout is professional and usable
  3. Validation works as expected
  4. No console errors or warnings
  5. All sections render properly on different screen sizes

- Add eventSanitizer utility to redact sensitive data from logs
  - Sanitizes secrets, tokens, passwords, API keys, and auth headers
  - Redacts query parameters from URLs
  - Deep sanitizes nested objects with configurable recursion depth

- Update all event handlers to log incoming events securely:
  - agency-event-handler
  - agency-registration-internal-handler
  - agency-assetsync-internal-handler
  - adobe-product-event-handler

- Enhance agency registration testing:
  - Add comprehensive test for registration.enabled event with demo data
  - Verify Agency object values (agencyId, brandId, name)
  - Verify agencyEndPointUrl built from app_runtime_info
  - Test complete registration flow from agency-event-handler to internal handler
  - Add registration-enabled event fixture from agency

- Improve Agency and AgencyManager classes:
  - Fix agency name and endpoint URL handling
  - Enhance agency identification and validation
  - Update UI components (AgencyListView, AgencyRegistrationList)

- Update event handling architecture:
  - Enhance AppEventRegistry and ProductEventRegistry
  - Improve event routing and validation
  - Add event handler routing documentation

- Reorganize event documentation:
  - Add AEM event samples with sync variations
  - Add agency-to-brand registration event samples
  - Update event README with better examples

This commit ensures all event logs are secure by default and adds
comprehensive testing for agency registration flows.
- Update agency-event-handler tests to expect fully qualified action names
  - Change 'agency-registration-internal-handler' to 'a2b-brand/agency-registration-internal-handler'
  - Change 'agency-assetsync-internal-handler' to 'a2b-brand/agency-assetsync-internal-handler'
- Fix error message assertion for unhandled event types
  - Update from 'Unhandled event type' to 'Event definition not found'

All tests now pass successfully (60 passed, 60 total)
- Fix /registrations route to use AgencyRegistrationList instead of AgencyListView
- Update AgencyRegistrationList to use correct viewProps structure (aioRuntimeNamespace, imsToken, imsOrg)
- Fix API service initialization to construct base URL from runtime namespace
- Update WorkfrontConfigModal props to use correct viewProps fields
- Add Workfront integration UI components and services
- Implement Workfront event registry and subscription management

This ensures the Workfront configuration modal is visible and functional
on the agency registrations view page.
- Refactor Agency form layout and user experience
  - Change layout from maxWidth size-5000 to size-6000 with better padding
  - Improve screen space utilization without over-stretching
  - Enhance overall form aesthetics and usability

- Enhance Workfront integration section
  - Wrap all Workfront fields in Flex column layout for vertical stacking
  - Add consistent size-200 gap between URL, Company, and Group fields
  - Set width 100% on all fields for proper container spanning
  - Auto-load companies/groups when opening edit form with existing data
  - Add dynamic required indicators (Company/Group required when URL provided)
  - Implement validation error display with auto-clear on selection
  - Clear validation errors when Workfront URL is removed

- Improve data loading and persistence
  - Load Workfront companies and groups on form initialization in edit mode
  - Properly populate dropdowns with current selections
  - Fix issue where dropdowns were empty/unselectable with existing data

- Add comprehensive validation and error handling
  - Display inline validation errors on Picker components
  - Auto-clear errors when user makes selections
  - Clear all Workfront errors when URL field is cleared
  - Provide immediate feedback on validation state

- Add documentation
  - Create AGENCY_FORM_REFACTOR.md with detailed implementation notes
  - Document all changes, benefits, and testing checklist
  - Include before/after comparisons and feature summaries

This refactor brings the Agency form in line with the Brand form improvements
made in a2b-agency, ensuring a consistent user experience across both applications.
Comment on lines +305 to +312
agency = await agencyManager.updateAgency(agencyId, {
enabled: false,
disabledAt: eventData.disabledAt ? new Date(eventData.disabledAt) : new Date(),
name: eventData.name || agency.name,
endPointUrl: agencyEndpointUrl,
agencyEndPointUrl: agencyEndpointUrl,
agencyName: agencyName || agency.agencyName
});

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning

The value assigned to agency here is unused.

Copilot Autofix

AI 5 months ago

To fix this problem, remove the assignment to agency while ensuring that the asynchronous function is still called and awaited for side effects. Change

agency = await agencyManager.updateAgency(agencyId, { ... });

to

await agencyManager.updateAgency(agencyId, { ... });

This preserves the side effects of the function call and ensures that code behavior is unchanged. Only the assignment is removed.

Edit only the relevant line in src/actions/event-handlers/agency-registration-internal-handler/index.ts within the shown snippet.

Suggested changeset 1
src/actions/event-handlers/agency-registration-internal-handler/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/actions/event-handlers/agency-registration-internal-handler/index.ts b/src/actions/event-handlers/agency-registration-internal-handler/index.ts
--- a/src/actions/event-handlers/agency-registration-internal-handler/index.ts
+++ b/src/actions/event-handlers/agency-registration-internal-handler/index.ts
@@ -302,7 +302,7 @@
         logger.info(`Disabling agency ${agencyId}`);
         // Update existing agency with disabled status
         // Keep the secret so it can be re-enabled later if needed
-        agency = await agencyManager.updateAgency(agencyId, {
+        await agencyManager.updateAgency(agencyId, {
           enabled: false,
           disabledAt: eventData.disabledAt ? new Date(eventData.disabledAt) : new Date(),
           name: eventData.name || agency.name,
EOF
@@ -302,7 +302,7 @@
logger.info(`Disabling agency ${agencyId}`);
// Update existing agency with disabled status
// Keep the secret so it can be re-enabled later if needed
agency = await agencyManager.updateAgency(agencyId, {
await agencyManager.updateAgency(agencyId, {
enabled: false,
disabledAt: eventData.disabledAt ? new Date(eventData.disabledAt) : new Date(),
name: eventData.name || agency.name,
Copilot is powered by AI and may make mistakes. Always verify output.
}

// Parse runtime info
const runtimeInfo = new ApplicationRuntimeInfo(

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable runtimeInfo.

Copilot Autofix

AI 5 months ago

The best way to fix this issue is to delete the initialization of the unused variable runtimeInfo, including the assignment and the line break it occupies (lines 62–64). This resolves the CodeQL warning and slightly improves readability and maintainability (removes dead code). Since no other code references runtimeInfo, no other modifications are necessary. No changes to imports, method signatures, or logic elsewhere in the file are needed.

Suggested changeset 1
src/actions/services/workfront/configure-workfront/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/actions/services/workfront/configure-workfront/index.ts b/src/actions/services/workfront/configure-workfront/index.ts
--- a/src/actions/services/workfront/configure-workfront/index.ts
+++ b/src/actions/services/workfront/configure-workfront/index.ts
@@ -59,9 +59,6 @@
         }
 
         // Parse runtime info
-        const runtimeInfo = new ApplicationRuntimeInfo(
-            JSON.parse(params.APPLICATION_RUNTIME_INFO)
-        );
 
         // Initialize Agency Manager
         const agencyManager = new AgencyManager(params.LOG_LEVEL || 'info');
EOF
@@ -59,9 +59,6 @@
}

// Parse runtime info
const runtimeInfo = new ApplicationRuntimeInfo(
JSON.parse(params.APPLICATION_RUNTIME_INFO)
);

// Initialize Agency Manager
const agencyManager = new AgencyManager(params.LOG_LEVEL || 'info');
Copilot is powered by AI and may make mistakes. Always verify output.
}

// Parse runtime info
const runtimeInfo = new ApplicationRuntimeInfo(

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable runtimeInfo.

Copilot Autofix

AI 5 months ago

To fix the problem, the unused variable runtimeInfo should be removed from the code, unless its instantiation is necessary to trigger essential side effects (which, without supporting evidence, we assume is not the case).
This means deleting or commenting out the following lines:

80:         const runtimeInfo = new ApplicationRuntimeInfo(
81:             JSON.parse(params.APPLICATION_RUNTIME_INFO)
82:         );

No further changes are needed if there is no requirement for this variable elsewhere in the shown code.


Suggested changeset 1
src/actions/services/workfront/manage-workfront-subscriptions/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/actions/services/workfront/manage-workfront-subscriptions/index.ts b/src/actions/services/workfront/manage-workfront-subscriptions/index.ts
--- a/src/actions/services/workfront/manage-workfront-subscriptions/index.ts
+++ b/src/actions/services/workfront/manage-workfront-subscriptions/index.ts
@@ -77,9 +77,6 @@
         }
 
         // Parse runtime info
-        const runtimeInfo = new ApplicationRuntimeInfo(
-            JSON.parse(params.APPLICATION_RUNTIME_INFO)
-        );
 
         // Initialize Agency Manager
         const agencyManager = new AgencyManager(params.LOG_LEVEL || 'info');
EOF
@@ -77,9 +77,6 @@
}

// Parse runtime info
const runtimeInfo = new ApplicationRuntimeInfo(
JSON.parse(params.APPLICATION_RUNTIME_INFO)
);

// Initialize Agency Manager
const agencyManager = new AgencyManager(params.LOG_LEVEL || 'info');
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +4 to +22
import {
View,
Form,
TextField,
Button,
Flex,
Heading,
Text,
Switch,
StatusLight,
Divider,
Content,
Header,
Image,
Well,
Picker,
Item,
ProgressCircle
} from '@adobe/react-spectrum';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused imports Divider, Image.

Copilot Autofix

AI 5 months ago

The best way to fix unused imports is to remove them entirely from the import statement. In this case, Divider and Image are imported from @adobe/react-spectrum but never used. The import statement on lines 4–22 should be edited to remove these two names but leave the others untouched. No additional changes or imports are required elsewhere in the code, and this edit will not affect functionality since they are not being used.


Suggested changeset 1
src/dx-excshell-1/web-src/src/components/layout/AgencyForm.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/dx-excshell-1/web-src/src/components/layout/AgencyForm.tsx b/src/dx-excshell-1/web-src/src/components/layout/AgencyForm.tsx
--- a/src/dx-excshell-1/web-src/src/components/layout/AgencyForm.tsx
+++ b/src/dx-excshell-1/web-src/src/components/layout/AgencyForm.tsx
@@ -11,10 +11,8 @@
     Text,
     Switch,
     StatusLight,
-    Divider,
     Content,
     Header,
-    Image,
     Well,
     Picker,
     Item,
EOF
@@ -11,10 +11,8 @@
Text,
Switch,
StatusLight,
Divider,
Content,
Header,
Image,
Well,
Picker,
Item,
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements Workfront integration for the a2b-brand application, adding the ability to configure Workfront settings, manage event subscriptions, and handle Workfront events. It also fixes several bugs related to agency registration and adds comprehensive event sanitization for logging.

Key Changes

  • Added Workfront integration with company/group configuration UI and API endpoints
  • Implemented WorkfrontClient for API interactions with S2S token caching (21-hour TTL)
  • Added event sanitization utilities to prevent sensitive data exposure in logs
  • Fixed agency name/endpoint URL handling in registration events
  • Enhanced registration.disabled event support with comprehensive testing

Reviewed Changes

Copilot reviewed 45 out of 46 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/actions/services/workfront/*.ts New Workfront service actions for listing companies/groups, configuration, and subscription management
src/actions/services/workfront/WorkfrontClient.ts Workfront API client with S2S authentication and cached token support
src/actions/utils/tokenCache.ts Token caching utility for S2S tokens with 21-hour TTL in state store
src/actions/utils/eventSanitizer.ts Event sanitization for secure logging, redacting secrets and tokens
src/actions/classes/WorkfrontEventRegistry.ts Registry of Workfront event definitions (projects, tasks, documents, etc.)
src/actions/classes/AppEventRegistry.ts Updated app event definitions with handler action names and proper field requirements
src/actions/event-handlers/agency-registration-internal-handler/index.ts Enhanced to handle registration.disabled events and fix agency name/endpoint URL bugs
src/dx-excshell-1/web-src/src/components/layout/AgencyForm.tsx New agency form component with Workfront configuration UI
src/actions/classes/Agency.ts Added Workfront fields and disabledAt timestamp
app.config.yaml Added new Workfront service actions with proper runtime configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

statusCode: 400,
body: {
error: 'Invalid S2S_SCOPES format',
message: 'S2S_SCOPES must be a valid JSON array string (e.g., \'["AdobeID","openid"]\')',
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

The error message uses escaped single quotes within single quotes which may be confusing. Consider using template literals or adjusting the quoting for better readability.

Suggested change
message: 'S2S_SCOPES must be a valid JSON array string (e.g., \'["AdobeID","openid"]\')',
message: `S2S_SCOPES must be a valid JSON array string (e.g., ["AdobeID","openid"])`,

Copilot uses AI. Check for mistakes.
statusCode: 400,
body: {
error: 'Invalid S2S_SCOPES format',
message: 'S2S_SCOPES must be a valid JSON array string (e.g., \'["AdobeID","openid"]\')',
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

The error message uses escaped single quotes within single quotes which may be confusing. Consider using template literals or adjusting the quoting for better readability.

Suggested change
message: 'S2S_SCOPES must be a valid JSON array string (e.g., \'["AdobeID","openid"]\')',
message: `S2S_SCOPES must be a valid JSON array string (e.g., '["AdobeID","openid"]')`,

Copilot uses AI. Check for mistakes.
}

// Update brand with subscription IDs
(agency as any).workfrontEventSubscriptions = subscriptionIds;
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Using 'as any' bypasses TypeScript's type safety. Consider updating the IAgency interface to include workfrontEventSubscriptions or create a typed update method in AgencyManager.

Copilot uses AI. Check for mistakes.
}

// Clear subscription IDs from brand
(agency as any).workfrontEventSubscriptions = [];
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Using 'as any' bypasses TypeScript's type safety. Consider updating the IAgency interface to include workfrontEventSubscriptions or create a typed update method in AgencyManager.

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +91
// Update agency with Workfront configuration
// Update the agency object properties
(agency as any).workfrontServerUrl = params.workfrontServerUrl;
(agency as any).workfrontCompanyId = params.workfrontCompanyId;
(agency as any).workfrontCompanyName = params.workfrontCompanyName;
(agency as any).workfrontGroupId = params.workfrontGroupId;
(agency as any).workfrontGroupName = params.workfrontGroupName;
(agency as any).workfrontEventSubscriptions = []; // Will be populated when subscriptions are created

// Save the updated agency
const updatedAgency = await agencyManager.saveAgency(agency);
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Multiple uses of 'as any' to bypass TypeScript type safety. Since the Agency class is readonly, consider using AgencyManager's updateAgency method instead of direct property assignment, which would maintain type safety.

Suggested change
// Update agency with Workfront configuration
// Update the agency object properties
(agency as any).workfrontServerUrl = params.workfrontServerUrl;
(agency as any).workfrontCompanyId = params.workfrontCompanyId;
(agency as any).workfrontCompanyName = params.workfrontCompanyName;
(agency as any).workfrontGroupId = params.workfrontGroupId;
(agency as any).workfrontGroupName = params.workfrontGroupName;
(agency as any).workfrontEventSubscriptions = []; // Will be populated when subscriptions are created
// Save the updated agency
const updatedAgency = await agencyManager.saveAgency(agency);
// Update agency with Workfront configuration using AgencyManager's updateAgency method
const updateFields = {
workfrontServerUrl: params.workfrontServerUrl,
workfrontCompanyId: params.workfrontCompanyId,
workfrontCompanyName: params.workfrontCompanyName,
workfrontGroupId: params.workfrontGroupId,
workfrontGroupName: params.workfrontGroupName,
workfrontEventSubscriptions: [] // Will be populated when subscriptions are created
};
const updatedAgency = await agencyManager.updateAgency(params.agencyId, updateFields);

Copilot uses AI. Check for mistakes.
Comment thread app.config.yaml
adobe-product-event-handler:
function: src/actions/event-handlers/product/adobe-product-event-handler/index.ts
web: 'yes'
web: 'no'
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

The adobe-product-event-handler was changed from web: 'yes' to web: 'no' and require-adobe-auth from true to false. This is a potentially breaking change that could affect how Workfront and other Adobe products send events to this handler. Ensure this aligns with the intended architecture and that Workfront events can still reach this handler.

Copilot uses AI. Check for mistakes.
Comment on lines +62 to +64
const runtimeInfo = new ApplicationRuntimeInfo(
JSON.parse(params.APPLICATION_RUNTIME_INFO)
);
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Unused variable runtimeInfo.

Suggested change
const runtimeInfo = new ApplicationRuntimeInfo(
JSON.parse(params.APPLICATION_RUNTIME_INFO)
);

Copilot uses AI. Check for mistakes.
}

// Parse runtime info
const runtimeInfo = new ApplicationRuntimeInfo(
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Unused variable runtimeInfo.

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +22
import {
View,
Form,
TextField,
Button,
Flex,
Heading,
Text,
Switch,
StatusLight,
Divider,
Content,
Header,
Image,
Well,
Picker,
Item,
ProgressCircle
} from '@adobe/react-spectrum';
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Unused imports Divider, Image.

Copilot uses AI. Check for mistakes.
Comment on lines +305 to +312
agency = await agencyManager.updateAgency(agencyId, {
enabled: false,
disabledAt: eventData.disabledAt ? new Date(eventData.disabledAt) : new Date(),
name: eventData.name || agency.name,
endPointUrl: agencyEndpointUrl,
agencyEndPointUrl: agencyEndpointUrl,
agencyName: agencyName || agency.agencyName
});
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

The value assigned to agency here is unused.

Copilot uses AI. Check for mistakes.
adobesam
adobesam previously approved these changes Nov 7, 2025
this.logger.debug('Listing Workfront companies');
const headers = await this.getAuthHeaders();

const response = await this.axiosClient.get('/attask/api/v15.0/company/search', {
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.

The latest API version is 21.
It might be a good idea to introduce version control (e.g., define a prefixed constant) so the API version can be managed from one central place.

Also, if I’m not mistaken, when no version is specified, the request defaults to the latest version of the Workfront API.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

lets do that in the next pull. i will patch this up to 21 and let you then have a go at it and fix up and add in versioning. sound ok?

const headers = await this.getAuthHeaders();

const response = await this.axiosClient.post(
'/attask/api/v15.0/eventsub',
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.

@davidbenge I am not shur but If I am not mistaken we do not have this api.
for getting subscriptions we have

GET  /attask/eventsubscription/api/v1/subscriptions
POST /attask/eventsubscription/api/v1/subscriptions
DELETE /attask/eventsubscription/api/v1/subscriptions/{id}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

your right let me update that

@davidbenge davidbenge dismissed adobesam’s stale review November 7, 2025 14:23

The merge-base changed after approval.

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.

5 participants