Skip to content

Listings - Expiration #232

@SevenThomas

Description

@SevenThomas

Overview

When a listing reaches its maximum reservation period, it should automatically transition to an “expired” state through a background expiration process. The UI and backend must both be updated to fully support this feature.

Requirements

  1. Backend: Automated Listing Expiration
  • Implement or extend a background job that scans for listings whose reservation period has ended.
  • When a listing expires:
    • Update its state in the database to “expired” per the domain model.
    • Ensure any necessary domain/integration events are emitted.
  1. Backend: Search & Visibility
  • Update listing search logic so expired listings are:
    • Not returned in public/browse/search queries for reservers.
    • Still visible to the sharer (listing owner) in their “My Listings” view.
  • Enforce this at the repository/service/query layer.
  1. Frontend: Listing Page UI (Sharer View)
  • On the listing page (when viewed by the listing owner/sharer):
    • Display an “Expired” label above the listing title (use Ant Design Tag: <Tag color="default">Expired</Tag>).
    • Show a top-level Ant Design Alert banner: <Alert type="warning" message="This listing has expired." banner />
  • Ensure the UI is only shown when the listing is in the “expired” state.

4. Integration & Testing

  • Expiration process (domain/event test, integration test for background job).
  • Search filtering (expired listings not in public search).
  • UI rendering (label and alert appear for expired listings).
  • Add/Update Storybook stories for the listing component to cover the expired state.

Acceptance Criteria

  • Listings automatically transition to “expired” when their reservation period ends.
  • Expired listings are never shown in public search/browse, but remain visible to their sharer.
  • Listing page for sharer displays an “Expired” label and alert banner.

References

  • See .github/instructions/ui/components.instructions.md, api-persistence.instructions.md, contexts.instructions.md, and project BRD/SRD for domain and UI conventions.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Scheduled

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions