Summary
TestInBrowser caches GET results under ${method}:${endpointUrl}, computed before query parameters are appended, so running the same endpoint with different parameter values returns the first cached response.
Why this matters
Developers testing an endpoint see stale results for new inputs and draw wrong conclusions about API behaviour.
Scope
Build the cache key from the final URL including the sorted query string, add a 'bypass cache' option, and abort in-flight requests on re-run or unmount.
Relevant code in CalloraOrg/Callora-Frontend:
src/components/TestInBrowser.tsx
src/hooks/useApiCache.ts
Priority
High
Acceptance criteria
- Different parameter values produce separate cache entries
- Identical parameters hit the cache
- Users can force a fresh request
- In-flight requests are aborted on unmount
Validation
npm test -- --run src/components/TestInBrowser.test.tsx
Non-goals
- Typo-only, formatting-only, or cosmetic changes.
- Unrelated refactors, dependency upgrades, or broad rewrites.
- Removing safeguards or weakening validation to make tests pass.
Contributor application
Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.
PR requirements
Use a feature branch and include Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.
Quality review
A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.
Generated by Claude Code
Summary
TestInBrowser caches GET results under
${method}:${endpointUrl}, computed before query parameters are appended, so running the same endpoint with different parameter values returns the first cached response.Why this matters
Developers testing an endpoint see stale results for new inputs and draw wrong conclusions about API behaviour.
Scope
Build the cache key from the final URL including the sorted query string, add a 'bypass cache' option, and abort in-flight requests on re-run or unmount.
Relevant code in CalloraOrg/Callora-Frontend:
src/components/TestInBrowser.tsxsrc/hooks/useApiCache.tsPriority
High
Acceptance criteria
Validation
npm test -- --run src/components/TestInBrowser.test.tsx
Non-goals
Contributor application
Before coding, describe the affected modules, proposed state/invariant changes, test strategy, compatibility considerations, and an estimate. Wait for assignment before starting implementation.
PR requirements
Use a feature branch and include
Closes #<issue-number>. Address every criterion, map criteria to code and tests, explain security and failure-mode handling, and ensure CI passes.Quality review
A maintainer will assess correctness, completeness, test depth, compatibility, observability, and adverse-case handling. A substantive implementation is required; merge or CI status alone does not guarantee reward eligibility.
Generated by Claude Code