fix(dynamodb): show items as plain JSON and stop double-encoding keys - #169
Merged
DaviReisVieira merged 1 commit intoSep 21, 2026
Conversation
The items API returns DynamoDB-typed attributes ({"S": "Hello"}), but the
browser treated them as plain values. The items table showed raw typed JSON,
the edit modal's "Plain JSON" mode showed typed data (and switching to
"DynamoDB JSON" wrapped it a second time), and delete wrapped the key again,
sending a malformed key.
- Convert items to plain values for the items table
- Open the edit modal in Plain JSON; switching to DynamoDB JSON on an
untouched item shows the original typed item, so sets keep their types
- Send the typed key as returned by the API when deleting
- Reuse dynamoItemToPlainMap instead of a duplicate local decoder
- Use typed items in the browser test mocks and add tests for plain display,
format switching and saving without double-encoding
Fixes DaviReisVieira#163
Owner
|
Merged!! Thanks a lot for this. Reproducing first and posting the plan on the issue before opening the PR made the review easy, and swapping the test mocks to the real typed shape was the right call, the old ones were hiding the bug. Two follow-ups, neither on you:
|
DaviReisVieira
added a commit
that referenced
this pull request
Sep 21, 2026
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.
Fixes #163
Problem
In the DynamoDB view, items were displayed as raw DynamoDB-typed JSON (
{"S": "Hello"}) in the items table, and the edit modal was wrong in both modes.Cause
/api/dynamodb/tables/{name}/items(and/query) return DynamoDB-typed attributes, and the backend tests rely on that.DynamoDBBrowsertreated them as plain values:JSON.stringifyof the typed attributeFix (frontend only,
DynamoDBBrowser.tsx)SS) keep their exact typesdynamoItemToPlainMapinstead of a duplicate local decoderTesting
tsc -b, eslint and the DynamoDB tests passHello/42/["a","b"], Edit shows plain JSON, DynamoDB JSON shows the exact typed form, and Delete removes the rowNote
Saving in Plain JSON mode still writes string sets back as lists (plain JSON has no set type). Use DynamoDB JSON mode to keep a set.