Skip to content

fix: improve snapshot compare and saved jobs handling (#71, #74, #75, #82) - #120

Merged
Exotic209093 merged 1 commit into
mainfrom
worktree-wf_6dffebfe-80c-23
Sep 9, 2026
Merged

fix: improve snapshot compare and saved jobs handling (#71, #74, #75, #82)#120
Exotic209093 merged 1 commit into
mainfrom
worktree-wf_6dffebfe-80c-23

Conversation

@Exotic209093

Copy link
Copy Markdown
Owner

Summary

Improves snapshot comparison logic and saved jobs persistence.

Issues Fixed

Changes

  • Fix snapshot comparison logic in SnapshotCenterScreen
  • Correct saved jobs metadata persistence
  • Improve job activity status display
  • Handle edge cases in snapshot diff rendering

🤖 Generated with Claude Code

…82)

- Fix snapshot comparison logic in SnapshotCenterScreen
- Correct saved jobs metadata persistence
- Improve job activity status display
- Handle edge cases in snapshot diff rendering

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T15:05:23.092015Z d991add PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: d991addca2

ℹ️ 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".

records.push(...(page.records ?? []));
while (page.nextRecordsUrl && records.length < 100_000) {
page = await props.sf.queryMore(page.nextRecordsUrl, props.tabId);
page = await props.sf.queryMore(page.nextRecordsUrl);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep pagination on the snapshot's target org

When the live query returns nextRecordsUrl, this continuation switches from CROSS_ORG_QUERY to SF_QUERY_MORE without a tabId. The latter resolves authentication from a Salesforce tab, so requests from the full-page extension can fail on page two; even if a tab is resolved, it may belong to a different org than targetOrgId. Live comparisons for multi-page results therefore fail or continue against the wrong org. Add a cross-org query-more path that retains targetOrgId for every page.

Useful? React with 👍 / 👎.

Comment on lines +77 to +82
const delta = Math.abs(snapshot.capturedAt - run.startedAt);
if (delta < bestDelta) {
bestDelta = delta;
bestId = snapshot.id;
}
}

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 Bound snapshot matches to the actual schedule run

When retention has pruned an older run's snapshot, this unconditionally assigns that run the nearest surviving snapshot from the same schedule, regardless of how far apart their timestamps are. Consequently every historical run appears to have an “Open result” even when its result was deleted, and the link leads users to an unrelated run's snapshots. Match the run's capture timestamp (the scheduler records capturedAt from the same startedAt value) or retain a suitably strict maximum delta.

Useful? React with 👍 / 👎.

Comment thread src/ui/utils/savedJobs.ts
): SavedJob[] {
const byId = new Map(existing.map(job => [job.id, job]));
const tombstones = new Set(deletedLegacyIds);
const byId = new Map(existing.filter(job => !tombstones.has(job.id)).map(job => [job.id, job]));

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 Allow deleted legacy jobs to be restored by import

After a migrated job is deleted, its ID remains tombstoned. If the user later imports a portable backup containing that same ID, importFile sees no collision and reports a successful import, but this filter removes the restored job the next time the screen mounts. Tombstones should suppress only regeneration from the legacy template/schedule arrays, or importing the job should clear/replace its tombstone.

Useful? React with 👍 / 👎.

@Exotic209093
Exotic209093 merged commit 96312ad into main Sep 9, 2026
1 check failed
@Exotic209093
Exotic209093 deleted the worktree-wf_6dffebfe-80c-23 branch September 9, 2026 15:06
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.

1 participant