{"agent":"claude","input":"Make the favorite and follow buttons in this Angular app optimistic and open a pull request that links the Linear issue. Read package.json, vitest.config.ts, src/test-setup.ts, src/app/features/article/components/favorite-button.component.ts, article-preview.component.ts, pages/article/article.component.ts, src/app/features/article/services/articles.service.ts and its spec, src/app/features/profile/components/follow-button.component.ts, pages/profile/profile.component.ts and services/profile.service.ts first. In each button, emit the toggled state before the HTTP call and emit the previous state again when the call errors, keeping the isSubmitting guard and the redirect for unauthenticated users; do not change the parents' toggle handlers or the services. Surface a failed request through the existing ListErrorsComponent. Add favorite-button.component.spec.ts and follow-button.component.spec.ts with TestBed and HttpTestingController asserting the immediate emission, no second emission on success, and the reverting emission on error. Run bun install, bun run test, bun run format:check and bun run build, and paste the Vitest output in the pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}