Rounding out: VITE_API_URL, manual fault form, landing page ingestion messaging - #66
Merged
Conversation
…ark mode brand, button spacing
…+ EvalCard t-prop, CSS comment)
There was a problem hiding this comment.
Pull request overview
Updates the web frontend to better support multiple integration/ingestion paths (manual entry, connected machines, bridges) and improves configuration flexibility by allowing the API base URL to be overridden via a Vite environment variable.
Changes:
- Allow overriding the frontend API base URL via
import.meta.env.VITE_API_URL. - Expand landing page messaging (feature cards, step 1, FAQ) to cover broader integration paths.
- Add a collapsible “manual fault report” UI on the dashboard and extend dashboard i18n coverage.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/api.js | Adds support for VITE_API_URL as the API base override. |
| web/src/styles.css | Adjusts dark-theme --brand variable for consistent theming. |
| web/src/pages/LandingPage.module.css | Adds a section header comment for readability. |
| web/src/pages/LandingPage.jsx | Updates landing step 1 copy and adds a new integration-oriented feature card + icon. |
| web/src/components/icons.jsx | Introduces IconBroadcast used on the landing page. |
| web/src/components/FAQ.jsx | Updates FAQ answers to reflect multiple integration methods and manual reporting. |
| web/src/pages/Dashboard.module.css | Adds layout + styles for an action row and the new manual fault form popover. |
| web/src/pages/Dashboard.jsx | Adds manual fault form, expands i18n usage across the dashboard, and refactors a few components to accept t. |
| web/src/i18n.jsx | Adds many new dashboard translation keys and refines a few Arabic strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <option value="pending">{t("dashboard.pending")}</option> | ||
| <option value="dispatched">{t("dashboard.dispatched")}</option> | ||
| <option value="resolved">{t("dashboard.resolved")}</option> | ||
| <option value="rejected">{t("dashboard.reject")}</option> |
| <button className={styles.simBtn} disabled={busy || loading} onClick={simulate}> | ||
| {t("dashboard.simulate")} | ||
| </button> | ||
| <ManualFaultForm onReport={(msg) => act(() => api.reportFault(msg), t("dashboard.toast_simulated"))} busy={busy} t={t} /> |
|
|
||
| return ( | ||
| <div className={styles.manualForm}> | ||
| <button className={styles.manualFormToggle} onClick={() => setOpen(!open)}> |
| @@ -1,4 +1,4 @@ | |||
| const BASE = "/api"; | |||
| const BASE = import.meta.env.VITE_API_URL || "/api"; | |||
| "dashboard.machine_placeholder": "Machine (e.g. CM-350 Line 2)", | ||
| "dashboard.fault_code_placeholder": "Fault code (e.g. E-471)", | ||
| "dashboard.context_placeholder": "Context / observations (optional)", | ||
| "dashboard.submit_fault": "Submit fault", |
| "dashboard.machine_placeholder": "Machine (ex. CM-350 Line 2)", | ||
| "dashboard.fault_code_placeholder": "Code défaut (ex. E-471)", | ||
| "dashboard.context_placeholder": "Contexte / observations (optionnel)", | ||
| "dashboard.submit_fault": "Soumettre le défaut", |
| "dashboard.machine_placeholder": "الآلة (مثل CM-350 Line 2)", | ||
| "dashboard.fault_code_placeholder": "رمز الخلل (مثل E-471)", | ||
| "dashboard.context_placeholder": "السياق / الملاحظات (اختياري)", | ||
| "dashboard.submit_fault": "إرسال الخلل", |
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.
Changes: api.js now supports VITE_API_URL env var. Landing page step 1, feature cards, and FAQ updated for broader integration paths (REST, MQTT, edge gateway, manual entry). Dashboard adds collapsible manual fault report form for legacy/analog machines.