feat: Data API frontend (rescued from development before reset) - #1657
Draft
rdahis wants to merge 7 commits into
Draft
feat: Data API frontend (rescued from development before reset)#1657rdahis wants to merge 7 commits into
rdahis wants to merge 7 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Rescue the Data API frontend work onto a
main-based branch beforedevelopmentis reset.The feature was developed in Feb–May 2025 and never reached production: its commits exist only on
origin/development, which diverged frommainunder the old workflow and is scheduled to be reset.Draft on purpose. Per Git Flow this must be validated via PRs into
developmentandstagingfirst. Those will be opened once the branches are reset; this PR stays in draft until then and merges intomainlast.Description
7 commits cherry-picked with
-xfromorigin/development, oldest→newest, original authorship preserved:a1bb17c8cea0ddb82cea36dbafcfcdf86bc7322f6bdeba3f345b0ec8Adds the
/data-api-docspage, the Data API section of the user area, the credits modal and Stripe credit-payment endpoint, and the endpoint/category API routes.Two commits from the range were deliberately dropped:
e3b5ed0e— byte-identical duplicate of6bc7322f(the same change was committed twice, once on the mainline and once on the feature branch).8ce54ff5— became empty; it only stripped two comments that no longer exist after the resolutions below.Already partly on
mainnext/public/locales/{en,es,pt}/dataAPI.jsonwere already onmainat their initiala1bb17c8state — they arrived via PR #1152 (feat/accesses). The later copy refinements in6bc7322fand345b0ec8were still missing and are included here.Conflict resolutions worth reviewing
pages/user/[username].js—mainhad already migratedsectionSelectedfrom array indices to string ids. The incoming index-based render block (choices[sectionSelected].value === …) was stale and would have broken the page, so6bdeba3f's string-id version was taken, matchingmain.pages/api/user/getUser.js— the GraphQL field set was unioned rather than taken from either side.6bdeba3fre-added thekeysblock from scratch after a revert and droppedname, but its ownDataAPI.jsstill renderskey.name; taking it literally would have shipped a silently blank field. This is the one place the result differs from a literal cherry-pick and is worth a look.locales/es/user.json— add/add conflict againstmain's newsurveyblock; both keys kept, JSON validated.Auth-related hunks in
[username].jsconflicted becausemainmoved the token from a query parameter to aCookieheader.main's version was kept in every case — the incoming side was the older, less safe form.Testing and evidence
Verified so far: all six locale JSON files parse;
DataAPIis exported and imported correctly; relative imports in the new files resolve; no conflict markers remain. Not yet run: a build or any browser check. Both should happen on thedevelopmentPR, along with an end-to-end check of the credits flow against the backend.Next steps
developmentis reset.developmentandstaging; validate there.mainlast.Depends on the backend PR in
basedosdados/backend— the user area needs thekeysGraphQL field to render.🤖 Generated with Claude Code