Skip to content

feat(frontend): unify feed/result state flow#943

Merged
gildesmarais merged 5 commits intomainfrom
codex/slice-ui-feed-result-state
Apr 4, 2026
Merged

feat(frontend): unify feed/result state flow#943
gildesmarais merged 5 commits intomainfrom
codex/slice-ui-feed-result-state

Conversation

@gildesmarais
Copy link
Copy Markdown
Member

@gildesmarais gildesmarais commented Apr 4, 2026

Summary

  • unify guest/member/result flow around a consistent dominant-field interaction model
  • refine app panels and result display behavior for readiness and retry states
  • align related frontend hooks/api wiring and test coverage with the updated UI state contract
  • rename frontend type entrypoint from env.d.ts to environment.d.ts

This pull request updates and improves the frontend test suites for the application, focusing on consistency in terminology, better test reliability, and improved clarity in test expectations. The changes include standardizing user-facing text in tests, switching from window to globalThis for global objects, and updating test logic to match recent UI and API changes.

Most important changes:

Terminology and Text Consistency:

  • Standardized the access token prompt from "Add access token" to "Enter access token" across all relevant tests, ensuring consistency with the application's UI. [1] [2] [3] [4]
  • Updated test expectations to use new user-facing messages, such as changing "Feed generation failed" to "Could not create feed link", "Your feed is ready" to "Feed ready", and other similar updates for clarity and consistency. [1] [2] [3] [4] [5]

Test Reliability and Modernization:

  • Replaced usage of window with globalThis for accessing global objects like localStorage and history in tests, improving compatibility and reliability in different testing environments. [1] [2] [3] [4] [5]
  • Changed test selectors from document.getElementById to document.querySelector for improved robustness and flexibility in selecting DOM elements. [1] [2] [3]

Test Data and Mocking Improvements:

UI and UX Flow Adjustments:

  • Updated test logic to match new UI flows, such as changing error handling and retry button labels from "Try ... instead" to "Retry with ...", and updating messages about feed creation and readiness. [1] [2] [3]

Minor Test and Code Cleanups:

  • Removed unused imports (e.g., h from preact) and improved array creation for utility items in tests for better readability. [1] [2]

These changes collectively improve test accuracy, maintainability, and ensure that tests reflect the current application behavior and user interface.

@gildesmarais gildesmarais marked this pull request as ready for review April 4, 2026 13:32
@gildesmarais gildesmarais merged commit 6dfa1a9 into main Apr 4, 2026
11 of 13 checks passed
@gildesmarais gildesmarais deleted the codex/slice-ui-feed-result-state branch April 4, 2026 13:33
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