Skip to content

reactive/data-client / .agents/skills/data-client-v0.19-migration

data-client-v0.19-migration

Verified

Upgrade apps that already use @data-client to v0.19. Runs the v0.19 codemod, then fixes what it flags and what it can't see. Use when bumping @data-client packages to 0.19, or when Controller.fetchIfStale(), custom Managers or the managers prop break after upgrading. Not for adopting Data Client for the first time.

evals/files/issue-tracker/src/prefetch.ts

View on GitHub
import type { Controller } from '@data-client/react';

import { isPromise } from './isPromise';
import { type Issue, IssueResource } from './resources';

const recentTitles = new Map<number, string>();

function rememberTitle(id: number, issue: Issue) {
  recentTitles.set(id, issue.title);
}

// called when an issue row scrolls into view, so the tooltip can show its title
export function warmIssue(ctrl: Controller, id: number) {
  const result = ctrl.fetchIfStale(IssueResource.get, { id });
  if (!isPromise(result)) rememberTitle(id, result);
}

export const getRecentTitle = (id: number) => recentTitles.get(id);
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall