Skip to content

Conversation

@gabeabrams
Copy link
Contributor

No description provided.

Copy link

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 adds the ability to override user information when logging by allowing callers to provide custom user details that take precedence over the default launch info values.

  • Adds an optional overriddenUserInfo parameter to the logging endpoint with userId, userFirstName, and userLastName fields
  • Updates the logging logic to use provided override values when available, falling back to launch info defaults
  • Updates package version and dependency to a stable release

Reviewed Changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/helpers/initServer.ts Adds overriddenUserInfo parameter to logging endpoint and passes user override fields to log creation
src/helpers/genRouteHandler.ts Implements logic to use override user info when provided, falling back to launch info defaults
package.json Bumps version to 4.2.1 and updates dce-reactkit dependency to stable 4.1.8
lib/helpers/initServer.js Compiled JavaScript output for initServer changes
lib/helpers/genRouteHandler.js Compiled JavaScript output for genRouteHandler changes

Comment on lines +68 to +70
* @param {number} [opts.userId] overriding Canvas id of the user performing the action
* @param {string} [opts.userFirstName] overriding first name of the user performing the action
* @param {string} [opts.userLastName] overriding last name of the user performing the action
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

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

The parameter documentation refers to 'opts.userId' but the actual parameter is 'overriddenUserInfo.userId'. The documentation should be corrected to match the parameter structure.

Suggested change
* @param {number} [opts.userId] overriding Canvas id of the user performing the action
* @param {string} [opts.userFirstName] overriding first name of the user performing the action
* @param {string} [opts.userLastName] overriding last name of the user performing the action
* @param {number} [overriddenUserInfo.userId] overriding Canvas id of the user performing the action
* @param {string} [overriddenUserInfo.userFirstName] overriding first name of the user performing the action
* @param {string} [overriddenUserInfo.userLastName] overriding last name of the user performing the action

Copilot uses AI. Check for mistakes.
Comment on lines +68 to +70
* @param {number} [opts.userId] overriding Canvas id of the user performing the action
* @param {string} [opts.userFirstName] overriding first name of the user performing the action
* @param {string} [opts.userLastName] overriding last name of the user performing the action
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

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

The parameter documentation refers to 'opts.userFirstName' but the actual parameter is 'overriddenUserInfo.userFirstName'. The documentation should be corrected to match the parameter structure.

Suggested change
* @param {number} [opts.userId] overriding Canvas id of the user performing the action
* @param {string} [opts.userFirstName] overriding first name of the user performing the action
* @param {string} [opts.userLastName] overriding last name of the user performing the action
* @param {number} [overriddenUserInfo.userId] overriding Canvas id of the user performing the action
* @param {string} [overriddenUserInfo.userFirstName] overriding first name of the user performing the action
* @param {string} [overriddenUserInfo.userLastName] overriding last name of the user performing the action

Copilot uses AI. Check for mistakes.
Comment on lines +68 to +70
* @param {number} [opts.userId] overriding Canvas id of the user performing the action
* @param {string} [opts.userFirstName] overriding first name of the user performing the action
* @param {string} [opts.userLastName] overriding last name of the user performing the action
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

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

The parameter documentation refers to 'opts.userLastName' but the actual parameter is 'overriddenUserInfo.userLastName'. The documentation should be corrected to match the parameter structure.

Suggested change
* @param {number} [opts.userId] overriding Canvas id of the user performing the action
* @param {string} [opts.userFirstName] overriding first name of the user performing the action
* @param {string} [opts.userLastName] overriding last name of the user performing the action
* @param {number} [overriddenUserInfo.userId] overriding Canvas id of the user performing the action
* @param {string} [overriddenUserInfo.userFirstName] overriding first name of the user performing the action
* @param {string} [overriddenUserInfo.userLastName] overriding last name of the user performing the action

Copilot uses AI. Check for mistakes.
@karendolan
Copy link
Member

@gabeabrams will this allow a log from the server side without the request object?

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.

3 participants