This repository was archived by the owner on Jan 9, 2026. It is now read-only.
Refactor to utilize context for metrics and sample manifest#2
Open
Refactor to utilize context for metrics and sample manifest#2
Conversation
897a889 to
27d58e5
Compare
owtaylor
commented
Jun 11, 2025
Contributor
Author
owtaylor
left a comment
There was a problem hiding this comment.
Generally looks good, a few things could be improved (talking to agent rather than myself)
| const newStore = await fetchMetrics(); | ||
| setStore(newStore); | ||
| } catch (error) { | ||
| console.log("Error loading metrics", error); |
Contributor
Author
There was a problem hiding this comment.
Let's add an error?: string field to MetricsStore and Manifest so that the web page can display an error rather than just being stuck in a loading state.
Contributor
Author
There was a problem hiding this comment.
And please make the pages display the errors rather than content if the error fields are set
| import { createContext, useContext, useEffect, useState } from "react"; | ||
| import { BASE } from "../site"; | ||
|
|
||
| interface Manifest { |
Contributor
Author
There was a problem hiding this comment.
Please rename this to SampleManifest
| postprocessors: string[]; | ||
| } | ||
|
|
||
| const emptyManifest: Manifest = { |
Contributor
Author
There was a problem hiding this comment.
there is no point to this since useSampleManifest() returns Manifest | undefined - we can just use undefined.
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.
This pull request includes the following changes:
This addresses the issue described in issue #1.