Goal
When a user submits a link in a link-type post, fetch and summarize the linked content into the description field using AI.
Scope
Full-stack: URL fetching, AI summarisation, and description field population.
Background
Link posts require a description to give readers context before clicking through. Rather than writing one manually, the user can have the AI read the linked page and generate a short description, which they can then edit before submitting.
Acceptance Criteria
Trigger
- The AI generation is triggered manually by clicking an "Auto-Generate" button displayed below the description field.
- The button is only active once a valid URL has been entered in the link field.
AI generation
- The linked page content is fetched and passed to the AI function as input.
- The AI returns a summary capped at 1000 characters.
- The existing prompt is updated to support link-based input and enforce the 1000-character constraint.
Description field behaviour
- The generated summary is populated into the description field.
- The field is plain text — no rich text allowed.
- The user can edit the generated content after it has been populated.
- The description field enforces a 1000 character maximum for both AI-generated and manually entered content.
-
- The field includes an auto-save (via local storage) indicator that reflects the current save state ("Saved").
- The description is not saved to the database until the post is submitted.
Button states
- Idle: "Auto-Generate Description" — button is enabled and visible once a valid URL is entered.
- Error: If the linked page cannot be fetched (e.g. invalid URL, paywalled, or unreachable), display an inline error below the description field: "We couldn't read that link. Please check the URL and try again." The button returns to its idle state.
- Generating: Button is disabled. A message is displayed: "Hold on! We are generating a description for your content, it may take a few seconds."
- Generated: The button is hidden. Auto-generation is a one-time action per post — once triggered, the button does not reappear. The one-time restriction is persisted in the database.
Note: Save the last time a user uses the button. @jlchilders11 please add more details on the suggested approach here. Please ensure it covers the enabling of unlimited use for staff members
FE/BE Actions
| Description |
URL |
| Fetch and summarize linked page content |
|
Out of Scope
- AI description generation for blog post type
- AI description generation for video post type
- Post submission flow
Goal
When a user submits a link in a link-type post, fetch and summarize the linked content into the description field using AI.
Scope
Full-stack: URL fetching, AI summarisation, and description field population.
Background
Link posts require a description to give readers context before clicking through. Rather than writing one manually, the user can have the AI read the linked page and generate a short description, which they can then edit before submitting.
Acceptance Criteria
Trigger
AI generation
Description field behaviour
Button states
FE/BE Actions
Out of Scope