Save+share using public ids instead of tokens - #415
Merged
Conversation
nofurtherinformation
temporarily deployed
to
pr-415
July 7, 2025 17:54 — with
GitHub Actions
Inactive
nofurtherinformation
had a problem deploying
to
pr-415
July 23, 2025 21:38 — with
GitHub Actions
Failure
nofurtherinformation
had a problem deploying
to
pr-415
July 23, 2025 21:41 — with
GitHub Actions
Failure
nofurtherinformation
had a problem deploying
to
pr-415
July 23, 2025 21:59 — with
GitHub Actions
Failure
nofurtherinformation
had a problem deploying
to
pr-415
July 23, 2025 22:01 — with
GitHub Actions
Failure
nofurtherinformation
had a problem deploying
to
pr-415
July 23, 2025 22:15 — with
GitHub Actions
Failure
nofurtherinformation
temporarily deployed
to
pr-415
July 23, 2025 22:15 — with
GitHub Actions
Inactive
nofurtherinformation
temporarily deployed
to
pr-415
July 23, 2025 22:41 — with
GitHub Actions
Inactive
nofurtherinformation
had a problem deploying
to
pr-415
August 4, 2025 20:35 — with
GitHub Actions
Error
nofurtherinformation
temporarily deployed
to
pr-415
August 4, 2025 20:36 — with
GitHub Actions
Inactive
nofurtherinformation
temporarily deployed
to
pr-415
August 4, 2025 20:42 — with
GitHub Actions
Inactive
nofurtherinformation
marked this pull request as ready for review
August 5, 2025 02:22
Collaborator
Author
|
I think this is ready for review. Some key updates:
|
nofurtherinformation
temporarily deployed
to
pr-415
August 5, 2025 02:52 — with
GitHub Actions
Inactive
raphaellaude
requested changes
Aug 5, 2025
raphaellaude
left a comment
Collaborator
There was a problem hiding this comment.
Looking good. A few comments:
- H: Why make documents accessible publicly if they aren't ready to share?
- H: I'm getting invalid password on checkout. We should add the tests back in to make sure this endpoint works
- Saving the password collapses the text field and the share type goes back to frozen, so you have to click copy link while the PW dialog is open.
- After getting the 404 doc not found error (which looks great!) we should probably route the user back to the blank map rather than leave them hanging on the
/edit/page
Comment on lines
+138
to
+136
| stmt = stmt.where(Document.public_id == document_id.value).where( | ||
| text("map_metadata->>'draft_status' = 'ready_to_share'") | ||
| ) | ||
| stmt = stmt.where(Document.public_id == document_id.value) |
Collaborator
There was a problem hiding this comment.
H: why remove this? do we want all maps to be publicly accessible before they are ready to share?
Collaborator
Author
There was a problem hiding this comment.
I think the case of someone sharing the map while not finished is more likely than the case of someone exploring random numbers and happening across an unfinished plan
but not 100% sure if this is the desired functionality
Collaborator
Author
Chris and I experienced this, too. I'll take a look today and see what's going on! |
Collaborator
Author
|
Good catches on the PW field collapsing and redirect -- I'll update those today |
nofurtherinformation
temporarily deployed
to
pr-415
August 5, 2025 14:45 — with
GitHub Actions
Inactive
Collaborator
Author
nofurtherinformation
temporarily deployed
to
pr-415
August 6, 2025 00:08 — with
GitHub Actions
Inactive
nofurtherinformation
temporarily deployed
to
pr-415
August 6, 2025 00:42 — with
GitHub Actions
Inactive
Collaborator
going to merge to unblock some downstream work |
fangge518
added a commit
that referenced
this pull request
Jul 30, 2026
- mapStore.ts: initialLoadingState only checked the district route prefix, a leftover from before community mode existed (PR #415, pre-COI) that never got extended when COI shipped. COI page loads started INITIALIZING instead of LOADING, so setMapRef could mark the app LOADED before the real document ever arrived. - pageMetadataUtils.ts: generateMapPageMetadata read the document id from searchParams, but every id-bearing map/coi route now (post URL-flip) carries it as a path param instead — so district map/edit /eval pages were silently generating generic OG metadata (broken "Map not found" preview image) instead of the map's own name/ description/thumbnail. Now reads params.public_id first, falling back to searchParams.document_id only for the legacy /map?document_id= redirect landing page. Dropped the COI pages' now-redundant manual searchParams repackaging now that direct assignment works for them too.
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.
This PR refactors save/share functionality to incorporate a public sequential ID (accessed when a map is moved off of 'scratch work' or shared with a frozen link. Additionally, it moves toward sharing in one of the three forms:
-
map/{public id}- Read only public map-
map/edit/{document id}- Editable map-
map/{public id}?pw=true- Password required share linkReviewers
Checklist
/map/edit/foo/map/{public id}/map/{public id}?pw=trueScreenshots (if applicable):