Diego Horvatti | Refactor repository structure and enhance backend and frontend features#221
Open
DIEGOHORVATTI wants to merge 54 commits into
Open
Diego Horvatti | Refactor repository structure and enhance backend and frontend features#221DIEGOHORVATTI wants to merge 54 commits into
DIEGOHORVATTI wants to merge 54 commits into
Conversation
… extractor-cronjob, backend-deployment, and various front-end challenges. Clean up associated README files and configuration files to streamline the project structure.
Contracts live outside apps/ as a shared package.
Parses raw sensor ids, computes stats and filters by time range. No transport or storage knowledge.
Stats follow the filtered window, not the whole series.
Port 3333 by default; 8000 is commonly taken.
Drops the kit's settings/i18n module: no preset switching or RTL here, so the theme is static.
Only the two font families the theme actually renders.
Single place that knows the API url and headers. Network failures become actionable messages instead of the browser's Failed to fetch.
Drops a selection that is not in the list, which covers links pointing at an unknown machine.
Anchored on the machine's last reading: anchoring on Date.now() would render an empty screen for a closed 2023 dataset.
Wraps the client call in an arrow function: the orpc client is a Proxy, and the fn.apply that call([obj, 'method']) performs would resolve as the non-existent machines.list.apply route.
takeLatest so a stale response never overwrites the current selection.
Factory instead of a singleton so each test gets an isolated store.
Fixed marginLeft on every chart is load-bearing, not cosmetic: crosshair sync finds each chart's point by pixel X, so letting Highcharts size margins from its own y-axis label (0.1 vs 15) would offset the plot areas and make the same X mean different instants.
Listens on the group container: the charts share a time range and width, so the same pixel X is the same instant in all of them.
Colors come from theme.vars, not theme.palette: with cssVariables on, theme.palette returns the default (light) scheme values, which froze every chart color to the light palette in dark mode.
Measurements are fetched once the selected machine is known: the saga anchors the range on lastReadingAt, so fetching earlier would silently drop the time filter.
Hydration is one-way on mount, then the store writes back with replace. Syncing both ways by effect looks symmetric but the write effect runs on the same commit with stale state and wipes the link's filters before they apply.
MemoryRouter instead of createMemoryRouter: the v7 data router navigates via fetch, and jsdom's AbortController clashes with undici, failing navigation silently under test.
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.
Repo: https://github.com/DIEGOHORVATTI/developer-challenges