Repository navigation
Choose where the DOI leads on the DOI step - #1754
Conversation
…at that asks of the author Both first-use walkers learned only at the address field, after signing and uploading, that the official page must show the DOI. Where the DOI leads is now chosen under the reserved DOI, before the byline (kept on the report until its details are read, then theirs: reports/flow:chooseLanding), and comes right after The work in the details and corrections. Under the place picked, a box says what to do and why: the report's page needs nothing; a place past it asks for the DOI on that page as text near the title, with the DOI to copy, why readers and Crossref need it there, and that Openscholar doesn't check the page. Without an official page yet, the step says the report's page can stay and the place can change later. The series' settings tell the admin what a place past the report's page asks of authors. Part of #1746
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9905687f69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // as the report's until its details are read, then as theirs (convex/reports/flow.ts `chooseLanding`). | ||
| const tLead = useTranslations("publishReports.lead"); | ||
| const chooseLanding = useMutation(api.reports.flow.chooseLanding); | ||
| const [landing, setLanding] = useState(report.metadata?.landing ?? report.landing); |
There was a problem hiding this comment.
Stop falling back to the initial landing once details exist
If an author picks an external landing on the DOI step, later switches to the report's page in Details, and runs the checks, checkedDetails removes metadata.landing because an absent landing represents the report's page (lib/reports/report.ts, landingPlaceOf). Returning to the DOI step through the supported back navigation then falls back to the stale external report.landing, displaying the wrong destination and instructions. Use the report-level fallback only when metadata does not yet exist; an undefined landing within existing metadata is already a meaningful selection.
Useful? React with 👍 / 👎.
| if (landing.url.length > DETAIL_TEXT.link) throw createError("VALIDATION_ERROR", `Keep the official page's address to ${DETAIL_TEXT.link} characters.`); | ||
| const details = await detailsOf(ctx, report._id); | ||
| if (details.metadata) await ctx.db.patch("reportDetails", details._id, { metadata: { ...details.metadata, landing } }); | ||
| await touch(ctx, report, { landing }); |
There was a problem hiding this comment.
Invalidate completed checks when changing the landing
When a report ready for activation is reopened at the DOI step, goTo sets reopened: true and the completed run is already cleared, so this mutation accepts changes to its metadata. Unlike saveDetails, it leaves reopened set, allowing the author to use the step trail to call backToChecks and then activate with the previous results and approval. This also bypasses the URL and allowed-place validation performed only when checks start, so an incomplete official-page address can reach registration. Clear reopened when saving the changed landing so the updated details must pass through checks again.
Useful? React with 👍 / 👎.
… its checks again Codex review: a ready report reopened at the DOI step could change where its DOI leads and go back to its earlier checks with Back to checks, skipping the address checks; the pick now clears reopened, as saving any other detail does. And once the details are read, none there is the report's page: the DOI step no longer falls back to the pick kept on the report before them.
Cross-family review: a pick made in the last 400 ms before a reload or close was lost. It is sent as the page goes, as the details form sends its edits.
Part of #1746. Built from the agreed mock (
mock/doi-place-early).Both first-use walkers learned that the official page must show the DOI only at the address field, after signing and uploading.
DOI step. "Where the DOI leads" is now chosen right under the reserved DOI, before the byline.
reports/flow:chooseLanding) until the PDF's details are read, then becomes part of the details.Details and corrections. The section moves up to right after The work.
What to do, and why. Under the place picked:
Settings. Once a series allows a place past the report's page, the admin is told what that asks of authors.
Checks
tsc,check:ui-rules,check:user-actionsandcheck:convex-rulespass.Vitest
convex/reportsandlib/reportspass, 325 tests. The new integration test covers:It fails without the hand-over to the details.
The screens were walked as the mock (agreement and DOI step, the correction form) in Chromium against shared dev. The save from the page reaches shared dev only after this deploys; the walker wave after the merge runs it.