Repository navigation
fix(activity): plain sentences, not JSON and event codes (#140) - #147
Merged
Merged
Conversation
Every audit action has a sentence of its own in five languages. The
action list lives in @kept/shared; audited(), the server's English and
the web's sentences are typed by it, so a new action without a sentence
fails the typecheck.
A map arrangement is said change by change ("Put HD webcam on Corner
desk"), more than five behind Show, and its layout JSON is no longer
sent. Ids, versions, counters, digits, locale and filters are hidden; a
report's things and photos become lines. A field set from nothing shows
its value without "empty". An upload folds into the row that used it,
and a capture's extraction into the capture (D253).
Closes #140
Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #140.
Activity and History now read as plain sentences.
What changes for a person
How it works
@kept/sharedAUDIT_ACTIONSlists every action the server writes.audited()accepts only these. The server's English map and the web's sentence map are bothRecord<SummaryKey, …>, so a new action without a sentence fails the typecheck. Tests also render every key in English and Arabic.eventstays only for actions this build doesn't know.history/arrange.tscompares the stored before/after layouts node by node. Names are resolved as the caller, so a node the reader can't see reads "a thing" or "a place". Shapes, room kinds and floors travel as codes and are said in the map's own words.summaryLinescarries the result, and thelayoutdiff is removed from the response.components/history/fields.tsis the field table: a hidden set, an id pattern, and entities whose sentence says it all.Tested
/activity: the layout is never sent, another location's names are never sent, an upload folds, an extraction folds, and a report reads by the location's name.