Skip to content

feat(atlas): Fill from PD — per-field suggestions in the project editor - #363

Merged
UgaTheDev merged 1 commit into
mainfrom
atlas-fill-from-pd
Dec 3, 2026
Merged

UgaTheDev merged 1 commit into
mainfrom
atlas-fill-from-pd

Conversation

@UgaTheDev

Copy link
Copy Markdown
Contributor

What

The project editor's PD fetch (/admin/projects/[id]) becomes Fill from PD: one fetch of the PD, then a per-field preview (current → from PD) with its own Use this for:

  • Description (same red-note-aware HTML extraction as before)
  • Tech tags and tech note (from parsePd, i.e. parseTechStack, with no extra guessing)
  • Repo URL (only an http(s) GitHub repo URL)

Rules

  • A field is offered only when the PD actually has a value. There's no full-text fallback for the description.
  • syncHolds problems show as a warning and Use is not offered. A held tech note also holds the tags, since both come from the same cell.
  • A field that already matches shows "Already matches".
  • Use only sets the form field. Nothing saves until the admin saves as usual.

How

  • lib/pd-fill.ts (pure) pdFillSuggestions(current, pd) + lib/pd-fill.test.ts.
  • components/PdBlurbFetch.tsx gains an optional fill prop. In fill mode it exports the doc as HTML (for the blurb) and as plain text (for parsePd, which is tuned on the plain-text export). Both requests run in parallel on the same GIS token. Without fill, it behaves as before, so /admin/new still uses "Fetch blurb" unchanged.
  • The editor no longer overwrites the blurb or tech note when you fetch. The admin picks each field to apply.

Verify

npx tsc --noEmit clean; npx vitest run 227/227. Not yet tried against a real PD in a browser (needs a BU Google session).

🤖 Generated with Claude Code

https://claude.ai/code/session_0152aazG7AAEF6rWPWCedVgY

The editor's PD fetch now offers a preview (current → from PD) with its own
"Use this" for the description, tech tags, tech note and repo URL, instead of
overwriting fields on fetch. Only fields the PD actually has are offered;
syncHolds problems show as a warning with no "Use"; repo only when it is an
http(s) GitHub repo URL; tags only as parsePd extracted them. "Use" sets the
form field; nothing saves until the admin saves.

PdBlurbFetch gains an optional `fill` prop; the new-project page keeps the
old Fetch blurb behaviour. Pure helper lib/pd-fill.ts with tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152aazG7AAEF6rWPWCedVgY
@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bbf2bf6e-b674-4b9b-afd1-f95cace6d558
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@UgaTheDev
UgaTheDev merged commit 0ebff1a into main Dec 3, 2026
4 checks passed
@UgaTheDev
UgaTheDev deleted the atlas-fill-from-pd branch December 3, 2026 21:30
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