Skip to content

fix(calling): render paginated voicemail list in sample#5090

Open
Jahnavi314 wants to merge 2 commits into
webex:nextfrom
Jahnavi314:voicemailtest
Open

fix(calling): render paginated voicemail list in sample#5090
Jahnavi314 wants to merge 2 commits into
webex:nextfrom
Jahnavi314:voicemailtest

Conversation

@Jahnavi314

Copy link
Copy Markdown
Contributor

This pull request addresses

The Calling sample did not correctly display Webex Calling voicemail records. The response was treated as a nested voicemail list, and inconsistent variable naming prevented voicemail rows from rendering.

The pagination action also returned a pending promise without awaiting the result or refreshing the displayed voicemail table with the entered offset and limit.

by making the following changes

  • Corrected Webex Calling voicemail response handling to use the returned voicemail array.
  • Corrected inconsistent voiceMailList references to voicemailList.
  • Updated createVoiceMail() to accept an offset and offset limit.
  • Updated fetchVoicemailList() to await the voicemail request.
  • Reused the existing voicemail rendering flow so pagination refreshes the same voicemail table.
  • Preserved forced refresh when fetching voicemail records.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

  • Manually initialized the Calling sample and opened the Voice Mail section.
  • Verified that clicking the green Voice Mail button displays voicemail records.
  • Verified that Fetch Voicemail List refreshes the existing voicemail table.
  • Verified that the SDK request completed successfully with status code 200.
  • Verified voicemail Play, Mark As Read, and Mark As Unread actions.

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - OpenAI Codex
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

GAI Coding Policy and copyright annotation best practices followed: the generated changes were manually reviewed, limited to the reported defect, and validated against the existing project code and formatting rules.

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and

@Jahnavi314 Jahnavi314 requested a review from a team as a code owner July 9, 2026 06:13
@Jahnavi314 Jahnavi314 added the validated If the pull request is validated for automation. label Jul 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9807efcefa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1652 to 1655
const response = await createVoiceMail(
parseInt(offset, 10),
parseInt(offsetLength, 10),
voicemailSort
parseInt(offsetLength, 10)
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep pagination fetches from mutating voicemail state

When the pagination button is used in the Webex Calling/BroadWorks branch, this now routes through createVoiceMail(), which still unconditionally calls getVoicemailContent(), voicemailMarkAsRead(), and then voicemailMarkAsUnread() for the first returned message whenever the page has rows. That means simply fetching any paginated page changes that page's first voicemail to unread and sends extra mutation requests; the old handler only called getVoicemailList(). Please make the rendering path side-effect-free or skip those demo read/unread calls when invoked from pagination.

Useful? React with 👍 / 👎.

@Jahnavi314 Jahnavi314 added validated If the pull request is validated for automation. and removed validated If the pull request is validated for automation. labels Jul 9, 2026
@github-actions github-actions Bot removed the validated If the pull request is validated for automation. label Jul 9, 2026
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.

2 participants