Skip to content

Rounding out: VITE_API_URL, manual fault form, landing page ingestion messaging - #66

Merged
AdamRidene merged 7 commits into
mainfrom
polish-round2
Jul 18, 2026
Merged

Rounding out: VITE_API_URL, manual fault form, landing page ingestion messaging#66
AdamRidene merged 7 commits into
mainfrom
polish-round2

Conversation

@AdamRidene

Copy link
Copy Markdown
Collaborator

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.

@AdamRidene
AdamRidene requested a review from Copilot July 18, 2026 19:11
@AdamRidene
AdamRidene merged commit b980be2 into main Jul 18, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)}>
Comment thread web/src/api.js
@@ -1,4 +1,4 @@
const BASE = "/api";
const BASE = import.meta.env.VITE_API_URL || "/api";
Comment thread web/src/i18n.jsx
"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",
Comment thread web/src/i18n.jsx
"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",
Comment thread web/src/i18n.jsx
"dashboard.machine_placeholder": "الآلة (مثل CM-350 Line 2)",
"dashboard.fault_code_placeholder": "رمز الخلل (مثل E-471)",
"dashboard.context_placeholder": "السياق / الملاحظات (اختياري)",
"dashboard.submit_fault": "إرسال الخلل",
@Goodnight77
Goodnight77 deleted the polish-round2 branch July 21, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants