Skip to content

Update fathom extension - #22760

Merged
raycastbot merged 4 commits into
raycast:mainfrom
chrismessina:ext/fathom
Nov 9, 2025
Merged

raycastbot merged 4 commits into
raycast:mainfrom
chrismessina:ext/fathom

Conversation

@chrismessina

@chrismessina chrismessina commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

Description

Changed

  • Updated fathom-typescript dependency from 0.0.30 to 0.0.36
  • Improved SDK integration with better error handling and validation
  • Added fallback to HTTP requests when SDK validation fails

Fixed

  • Fixed TypeScript type safety issue with async iterator responses in listMeetings
  • Enhanced error handling for edge cases in API responses

Checklist

- Merge branch \'contributions/merge-1762633243844\'
- Pull contributions
- Merge branch \'contributions/merge-1762633176254\'
- Pull contributions
- chore: update changelog and improve code quality
- chore: update Fathom SDK to v0.0.36 and improve cache invalidation
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: fathom Issues related to the fathom extension AI Extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Nov 8, 2025
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

You can expect an initial review within five business days.

@chrismessina

Copy link
Copy Markdown
Contributor Author

@greptile could you take a look?

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR looks solid overall! You've successfully updated the Fathom SDK from version 0.0.30 to 0.0.36 and made all the necessary adjustments to handle the breaking changes. Here are my observations:

✅ Strengths

  1. Comprehensive Migration: You've thoroughly documented the migration in SDK_0.0.36_MIGRATION.md with detailed explanations of what changed and why.

  2. Proper Type Updates: All the import paths have been correctly updated from models/ to sdk/models/shared/ structure.

  3. Fixed Core Issues: The three main problems (duplicate meetings, missing metadata, NOT_FOUND errors) have been properly addressed by using the SDK's native recordingId field.

  4. Code Cleanup: Good job removing unused legacy code (Recording type, mapRecordingFromMeeting, listRecentRecordings).

  5. Enhanced Error Handling: The fallback mechanism is maintained while improving the primary SDK integration.

🔍 Areas to Review

1. PageIterator Implementation

In listTeams() and listTeamMembers(), you're using break after the first iteration:

for await (const response of result) {
  if (!response?.result) continue;
  const teamListResponse = response.result;
  items.push(...teamListResponse.items.map(convertSDKTeam));
  nextCursor = teamListResponse.nextCursor || undefined;
  break; // Only get first page
}

Question: Is this intentional? The comment suggests you only want the first page, but this might limit functionality if there are many teams/members. Consider whether you want to implement proper pagination here.

2. Cache Invalidation Strategy

You've changed the cache hashing in cacheManager.ts:

// Before: Only used recordingId
// After: Uses recordingId AND timestamp
const dataHash = meetings
  .map((m) => `${m.recordingId}:${m.createdAt || m.startTimeISO}`)

This is good for detecting changes, but might cause more cache invalidations than necessary if timestamps change frequently.

3. Type Safety in Converters

The calendarInvitees extraction looks robust, but could be simplified:

calendarInvitees: m.calendarInvitees
  .map(inv => inv.email)
  .filter((email): email is string => email != null),
calendarInviteesDomains: Array.from(
  new Set(
    m.calendarInvitees
      .map(inv => inv.email?.split("@")[1])
      .filter((domain): domain is string => domain != null)
  )
),

🎯 Minor Suggestions

  1. Version Consistency: The changelog shows {PR_MERGE_DATE} - make sure this gets updated when merged.

  2. Error Handling: The fallback comment mentions "SDK v0.0.36 has improved validation" - consider if the fallback is still necessary or can be removed after testing.

  3. Testing: Have you tested with:

    • Large datasets (many meetings/teams)?
    • Edge cases (meetings without action items, external meetings)?
    • The refresh cache functionality under load?

✅ Overall Assessment

This is a well-executed SDK upgrade with proper attention to breaking changes and backward compatibility. The documentation is excellent, and the code changes address the specific issues mentioned. The PR should be good to merge after addressing the minor points above.

Great work on the thorough migration! 🚀

@chrismessina

Copy link
Copy Markdown
Contributor Author

@greptile

🔍 Areas to Review

1. PageIterator Implementation

In listTeams() and listTeamMembers(), you're using break after the first iteration:

for await (const response of result) {
  if (!response?.result) continue;
  const teamListResponse = response.result;
  items.push(...teamListResponse.items.map(convertSDKTeam));
  nextCursor = teamListResponse.nextCursor || undefined;
  break; // Only get first page
}

Question: Is this intentional? The comment suggests you only want the first page, but this might limit functionality if there are many teams/members. Consider whether you want to implement proper pagination here.

I've removed the break statements from both listTeams and listTeamMembers to enable automatic full pagination. The changes:

2. Cache Invalidation Strategy

You've changed the cache hashing in cacheManager.ts:

// Before: Only used recordingId
// After: Uses recordingId AND timestamp
const dataHash = meetings
  .map((m) => `${m.recordingId}:${m.createdAt || m.startTimeISO}`)

This is good for detecting changes, but might cause more cache invalidations than necessary if timestamps change frequently.

I've updated the cache hashing strategy to use only recordingId instead of including timestamps.

3. Type Safety in Converters

The calendarInvitees extraction looks robust, but could be simplified:

calendarInvitees: m.calendarInvitees
  .map(inv => inv.email)
  .filter((email): email is string => email != null),
calendarInviteesDomains: Array.from(
  new Set(
    m.calendarInvitees
      .map(inv => inv.email?.split("@")[1])
      .filter((domain): domain is string => domain != null)
  )
),

I've simplified the calendarInvitees and calendarInviteesDomains extraction in
convertSDKMeeting.

🎯 Minor Suggestions

  1. Error Handling: The fallback comment mentions "SDK v0.0.36 has improved validation" - consider if the fallback is still necessary or can be removed after testing.

I've simplified the error handling across all three list functions (listMeetings, listTeams, listTeamMembers) by:

Removed:

  • The overly-specific statusCode === 200 check that was silently working around SDK validation failures
  • Redundant comments about v0.0.36 edge cases

Kept:

  • The general HTTP fallback for actual network/connection errors
  • Logging to track when fallbacks are used

Rationale:

  • SDK v0.0.36 has improved validation, so the edge case workaround is less necessary
  • If the API returns 200 but SDK validation fails, that's worth logging (not silently ignoring)
  • The HTTP fallback still provides resilience for genuine network issues
  • Cleaner, more maintainable code without the special-case logic

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking at your changes, I can see you've made excellent improvements to the Fathom extension! Let me provide some feedback on the areas you've highlighted:

1. PageIterator Implementation ✅

Your removal of the break statements is the right approach. The original implementation was artificially limiting results to the first page, which would cause issues when there are many teams or team members. Here's the improved implementation:

export async function listTeams(
  args: { cursor?: string } = {},
): Promise<Paginated<Team>> {
  try {
    const client = getFathomClient();

    const result = await client.listTeams({
      cursor: args.cursor,
    });

    const items: Team[] = [];
    let nextCursor: string | undefined = undefined;

    for await (const response of result) {
      if (!response?.result) continue;
      const teamListResponse = response.result;
      items.push(...teamListResponse.items.map(convertSDKTeam));
      nextCursor = teamListResponse.nextCursor || undefined;
    }

    return { items, nextCursor };
  } catch (error) {
    logger.error("[API] 💥 listTeams SDK error:", error);
    throw error;
  }
}

This now properly handles pagination and will collect all teams across multiple pages.

2. Cache Invalidation Strategy ✅

Your updated cache hashing approach is much better:

  private async cacheApiResults(meetings: Meeting[]): Promise<void> {
    // Create a hash of the meeting IDs to detect duplicates
    const dataHash = meetings
      .map((m) => m.recordingId)
      .sort()
      .join(",");

This prevents unnecessary cache invalidations while still detecting when the set of meetings changes (additions/removals).

3. Type Safety in Converters ✅

Your simplified approach for calendarInvitees and calendarInviteesDomains is much cleaner:

    calendarInvitees: m.calendarInvitees
      .map(inv => inv.email)
      .filter((email): email is string => email != null),
    calendarInviteesDomains: Array.from(
      new Set(
        m.calendarInvitees
          .map(inv => inv.email?.split("@")[1])
          .filter((domain): domain is string => domain != null)
      )
    ),

This removes the verbose IIFE patterns while maintaining proper type safety.

4. Error Handling Improvements ✅

Your simplified error handling is appropriate for SDK v0.0.36. The removal of the special statusCode === 200 workaround makes sense since the SDK validation has improved. The general fallback for network errors is still valuable.

Additional Observations

Excellent work on:

  • ✅ Proper SDK v0.0.36 migration with correct import paths
  • ✅ Using the native recordingId field instead of URL parsing
  • ✅ Adding the refresh cache functionality
  • ✅ Comprehensive documentation in the migration guide
  • ✅ Maintaining backwards compatibility where needed

One minor suggestion:
Consider adding error boundaries around the PageIterator loops to handle potential SDK response format changes gracefully, but this isn't critical given the existing outer try-catch blocks.

Overall, this is a well-executed SDK migration that addresses the core issues (duplicates, missing metadata, NOT_FOUND errors) while improving code maintainability and user experience. The changes look ready for production! 🚀

- ran lint
- refactor: simplify calendarInvitees and calendarInviteesDomains formatting
- refactor: simplify error handling and improve cache invalidation logic
@chrismessina
chrismessina marked this pull request as ready for review November 8, 2025 22:32

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This review covers only the changes made since the last review, not the entire PR. The changes primarily focus on improving the Fathom extension's SDK integration and error handling. The PR updates the fathom-typescript dependency from 0.0.30 to 0.0.36 and simplifies error handling logic by removing specific SDK validation failure checks. The changes include simplified error handling that falls back to HTTP requests for any SDK errors rather than just validation failures, automatic pagination for team-related API calls instead of single-page fetching, and improved cache management that only invalidates when the actual meeting set changes rather than on timestamp updates. Additionally, the converter utilities were refactored to eliminate code duplication while maintaining the same functionality for processing calendar invitee data.

Important Files Changed

Filename Score Overview
extensions/fathom/src/fathom/api.ts 3/5 Simplified error handling and changed pagination behavior from single-page to automatic multi-page fetching
extensions/fathom/src/utils/cacheManager.ts 4/5 Improved cache hashing logic to prevent unnecessary invalidations from timestamp updates
extensions/fathom/src/utils/converters.ts 5/5 Code cleanup that eliminates duplication in calendar invitee processing without changing functionality

Confidence score: 3/5

  • This PR requires careful review due to potential performance implications from automatic pagination changes
  • Score reflects concerns about the automatic pagination behavior which could impact performance with large datasets, and the broad error handling changes that might mask specific SDK issues
  • Pay close attention to the API file's pagination changes and simplified error handling logic

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread extensions/fathom/src/fathom/api.ts Resolved
@pernielsentikaer

Copy link
Copy Markdown
Contributor

Hi @chrismessina👋

Thanks for your contribution 🔥

Do you want to address more from Greptile?

@pernielsentikaer
pernielsentikaer marked this pull request as draft November 9, 2025 06:43
@chrismessina

Copy link
Copy Markdown
Contributor Author

@greptile could you take another look?

I've improved the listTeams function to address the performance concerns:

Changes Made

  • Configurable limit: Added optional maxPages parameter to the function signature with a sensible default (10).
  • Progress logging: Added detailed logging that tracks:
    • Page count during iteration
    • Items fetched per page
    • Running total of items
    • Completion summary with total pages and items
  • Early termination: The loop now breaks when maxPages is reached, preventing unnecessary API calls for large datasets.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've reviewed the changes to the listTeams function and they look excellent! The improvements you've made address all the performance concerns I raised earlier:

✅ Great Improvements

1. Configurable Pagination Limit

  • The maxPages parameter with a default of 10 is a smart approach
  • 10 pages could handle 100-500 teams (depending on page size), which should cover most organizations

2. Comprehensive Logging

  • Progress tracking with page count and running totals
  • Clear completion summary
  • Will help with debugging and monitoring performance

3. Early Termination

  • Proper break when maxPages is reached
  • Prevents runaway pagination for organizations with thousands of teams

4. Consistent Pattern

  • Now matches the async iterator pattern used in listMeetings()
  • The code structure is clean and readable

Additional Observations

Looking at the broader changes in this PR, I also notice you've:

  • Updated the SDK from 0.0.30 to 0.0.36 with proper handling of the new data structures
  • Fixed the listTeamMembers function with the same async iterator pattern
  • Added refresh cache functionality with CMD+R shortcut
  • Improved error handling with fallbacks to HTTP requests

The overall SDK migration looks well-executed. The new version appears to provide better type safety and more complete data (like actionItems, createdAt, etc.), and you've handled the breaking changes properly.

Minor Suggestion: You might consider adding the same maxPages parameter to listTeamMembers for consistency, but it's probably less critical there since team member lists are typically smaller.

Great work on this comprehensive update! 🚀

@chrismessina
chrismessina marked this pull request as ready for review November 9, 2025 18:20

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR upgrades the Fathom extension's SDK dependency from v0.0.30 to v0.0.36, bringing significant improvements to type safety and error handling. The changes include comprehensive updates to import paths (from fathom-typescript/models/* to fathom-typescript/sdk/models/shared/*), enhanced data extraction with new fields like meetingTitle and actionItemsCount, and improved cache management. The integration introduces a refresh cache functionality throughout the UI components, allowing users to manually refresh data when needed. The changes also optimize cache invalidation by using only immutable recordingId values for hash calculation, preventing unnecessary cache refreshes from timestamp updates while maintaining data integrity.

Important Files Changed

Filename Score Overview
extensions/fathom/package.json 4/5 Updates fathom-typescript dependency from0.0.30 to ^0.0.36 with proper AI tools configuration
extensions/fathom/src/utils/converters.ts 4/5 Updates SDK import paths and enhances meeting conversion with new fields and better type safety
extensions/fathom/src/fathom/api.ts 4/5 Major refactor with improved error handling, null safety checks, and automatic pagination for teams
extensions/fathom/src/utils/cacheManager.ts 5/5 Optimizes cache invalidation by using only immutable recordingId for hash calculation
extensions/fathom/src/hooks/useCachedMeetings.ts 4/5 Changes caching strategy to always fetch fresh data on mount for better data freshness
extensions/fathom/src/search-meetings.tsx 4/5 Adds refresh cache action to UI and passes refresh callback to meeting list items
extensions/fathom/src/actions/RefreshCacheAction.tsx 5/5 New clean component implementing refresh functionality with standard Raycast patterns
extensions/fathom/src/components/MeetingListItem.tsx 5/5 Adds optional onRefresh prop with proper backward compatibility
extensions/fathom/src/actions/MeetingActions.tsx 4/5 Adds conditional refresh cache action to meeting actions panel
extensions/fathom/CHANGELOG.md 5/5 Properly formatted changelog entry with required template string
extensions/fathom/docs/SDK_0.0.36_MIGRATION.md 5/5 Comprehensive migration documentation detailing issues fixed and breaking changes

Confidence score: 4/5

  • This PR makes significant improvements to SDK integration with comprehensive error handling and type safety fixes
  • Score reflects the complexity of the SDK upgrade and potential for unexpected edge cases, though the implementation appears thorough and well-tested
  • Pay close attention to the automatic pagination logic in api.ts and the caching strategy changes in useCachedMeetings.ts

13 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit b3ee520 into raycast:main Nov 9, 2025
@github-actions

github-actions Bot commented Nov 9, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

csymons pushed a commit to csymons/raycast-extensions that referenced this pull request Nov 13, 2025
- set RefreshStatus on all command calls
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
- Update CODEOWNERs (b30fad6)
- Add httpperf extension (raycast#22809)
- Update CODEOWNERs (a1b96be)
- Add git extension (raycast#22550)
- Update CODEOWNERs (9c35408)
- Add logos-launcher extension (raycast#22366)
- Update CODEOWNERs (792ccbd)
- Add crypto-portfolio-tracker extension (raycast#22516)
- Update CODEOWNERs (7c738cc)
- chore: update github username (raycast#22634)
- Update CODEOWNERs (2009369)
- feat(screenocr): add option to disable sound and toast message (raycast#22559)
- feat: Vision Support with Pixtral Models and Clipboard Integration (raycast#22724)
- Update CODEOWNERs (76861a7)
- Update deepcast extension (