+
+
+ {/* Header with Icons and Title */}
+
+
+
+
+ {/* Content */}
+
+
+ );
+}
+```
+
+**Sources:**[src/components/Panels/Notifications.js#38-50](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Notifications.js#L38-L50)[src/components/Panels/Notifications.js#110-129](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Notifications.js#L110-L129)[src/components/Panels/Files.js#57-71](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L57-L71)
+
+---
+
+## Panel Visibility and State Management
+
+### Visibility Logic
+
+Panel visibility is determined by boolean flags in the interface settings (e.g., `showfilespanel`). The `Dashboard` component filters the `panels` list from `useUiContext()` to decide what to render.
+
+[Flowchart Diagram]
+
+### Dependency Resolution
+
+Panels often depend on other settings. For example, the `OverridesPanel` only renders if `showoverridespanel` is true.
+
+```
+const OverridesControls = () => {
+ const { overrides } = useTargetContext()
+ if (!useUiContextFn.getValue("showoverridespanel")) return null
+ // ...
+}
+```
+
+**Sources:**[src/components/Panels/OverridesCNC.js#34-36](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/OverridesCNC.js#L34-L36)[src/pages/dashboard/index.js#113-121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/pages/dashboard/index.js#L113-L121)
+
+---
+
+## Panel Ordering System
+
+### Fixed vs. Dynamic Layout
+
+The system supports two ordering modes controlled by the `fixedpanels` setting:
+
+1. **Dynamic**: Panels appear in the order defined by the target's default list.
+2. **Fixed**: Panels follow the user-defined order stored in `panelsorder`.
+
+The `Dashboard` component tracks this via `uisettings.getValue("fixedpanels")`. When enabled, users can reorder panels, and the new sequence is persisted to the device's `preferences.json`.
+
+**Sources:**[src/pages/dashboard/index.js#118-121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/pages/dashboard/index.js#L118-L121)[src/targets/index.js#26](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/index.js#L26-L26) (defaultPanelsList)
+
+---
+
+## Extra Content and Extensions
+
+The `ExtraContent` system allows for dynamic UI injection. These items are not hardcoded but defined in settings.
+
+### ExtraContent Architecture
+
+[Flowchart Diagram]
+
+### Key Functions
+
+- `updateContentPosition()`: Calculates the bounding rectangle of the target container to position the absolute-layered extra content (like iframes or video).
+- `handleRefresh()`: Triggers a reload of the content via the `eventBus`.
+- `dispatchToExtensions()`: Facilitates communication between the WebUI and iframe-based extensions.
+
+**Sources:**[src/components/ExtraContent/index.js#36-59](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/ExtraContent/index.js#L36-L59)[src/components/ExtraContent/index.js#116-121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/ExtraContent/index.js#L116-L121)[src/areas/index.js#84-120](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/areas/index.js#L84-L120)
+
+---
+
+## Interaction and Control Flow
+
+Panels interact with the machine firmware through the `useHttpFn` and `useTargetContext` hooks.
+
+### Command Execution Flow (Files Example)
+
+1. User clicks "Play" on a file in `FilesPanel`.
+2. `FilesPanel` calls `files.command(currentFS, "play", file)`.
+3. The command is sent via `createNewRequest` to `espHttpURL("command", { cmd: ... })`.
+4. Success/Failure is reported via `toasts.addToast`.
+
+```
+const sendURLCmd = (cmd) => {
+ createNewRequest(
+ espHttpURL(cmd.url, cmd.args),
+ { method: "GET" },
+ {
+ onSuccess: (result) => { /* Refresh list */ },
+ onFail: (error) => { toasts.addToast({ content: error, type: "error" }) }
+ }
+ )
+}
+```
+
+**Sources:**[src/components/Panels/Files.js#115-136](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L115-L136)[src/components/Panels/Jog.js#85-97](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js#L85-L97)
+
+---
+
+## Keyboard Shortcuts Integration
+
+The Panel System integrates with a global keyboard listener managed in the `Dashboard`.
+
+- **Key Mapping**: Keys are mapped to panel buttons via `keymap` and `macros` preferences.
+- **Bail Condition**: Shortcuts are disabled if the user is focused on an `INPUT` element to prevent accidental machine movement while typing G-code.
+- **Auto-repeat**: Supports continuous movement for jogging if `enableautorepeat` is set.
+
+**Sources:**[src/pages/dashboard/index.js#43-52](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/pages/dashboard/index.js#L43-L52)[src/pages/dashboard/index.js#91-110](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/pages/dashboard/index.js#L91-L110)
+
+---
+
+# 5.2-Status-and-Monitoring-Panels
+
+# Status and Monitoring Panels
+Relevant source files
+
+- [src/components/Panels/Charts.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Charts.js)
+- [src/components/Panels/Extruders.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Extruders.js)
+- [src/components/Panels/Status.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js)
+- [src/components/Panels/Temperatures.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js)
+- [src/targets/Printer3D/Marlin-embedded/TargetContext.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin-embedded/TargetContext.js)
+- [src/targets/Printer3D/Marlin/TargetContext.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js)
+- [src/targets/Printer3D/Marlin/filters.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/filters.js)
+- [src/targets/Printer3D/Repetier/TargetContext.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Repetier/TargetContext.js)
+- [src/targets/Printer3D/Smoothieware/TargetContext.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Smoothieware/TargetContext.js)
+
+## Purpose and Scope
+
+This page documents the **status and monitoring panels** in ESP3D-WEBUI, which provide real-time visibility into printer and machine operations. These panels display print progress, temperatures, positions, and machine state by consuming data from the firmware through the `TargetContext` system.
+
+The primary monitoring panels are:
+
+- **StatusPanel**: Real-time print job progress, filename, and machine state controls. [src/components/Panels/Status.js#168-378](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L168-L378)
+- **TemperaturesPanel**: Current and target temperatures for extruders, beds, chambers, and other sensors. [src/components/Panels/Temperatures.js#106-259](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L106-L259)
+- **ChartsPanel**: Historical temperature and sensor data visualized via the Smoothie charting library. [src/components/Panels/Charts.js#55-296](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Charts.js#L55-L296)
+
+---
+
+## Monitoring Panel Architecture
+
+Monitoring panels consume real-time data from `TargetContext`, respond to user preferences from `SettingsContext`, and display firmware-specific information parsed by the filter system.
+
+### Data Flow Diagram
+
+This diagram bridges the gap between the firmware's raw output and the UI components.
+
+[Flowchart Diagram]
+
+**Sources**: [src/components/Panels/Status.js#23-27](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L23-L27)[src/targets/Printer3D/Marlin/TargetContext.js#172-230](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L172-L230)[src/targets/Printer3D/Marlin/filters.js#26-180](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/filters.js#L26-L180)
+
+---
+
+## StatusPanel Component
+
+The `StatusPanel` tracks active print jobs. It differentiates between files printed from the firmware's local storage (SD/TFT) and files streamed from the WebUI via the ESP701 protocol. [src/components/Panels/Status.js#72-166](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L72-L166)
+
+### Status Data Structures
+
+The panel consumes two distinct status objects from `TargetContext`:
+
+| | | |
+| --- | --- | --- |
+| `status` | `printState` (status, printing, progress), `filename`, `printTime`, `printLeftTime` | Firmware reports (e.g., M27) [src/targets/Printer3D/Marlin/TargetContext.js#80-84](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L80-L84) |
+| `streamStatus` | `status` (processing/pause), `name`, `progress`, `printTime`, `printLeftTime` | ESP701 WebUI Stream [src/targets/Printer3D/Marlin/TargetContext.js#77](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L77-L77) |
+
+### Control Buttons and Device Logic
+
+The panel renders a `deviceList` that maps physical storage to UI controls. [src/components/Panels/Status.js#175-300](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L175-L300)
+
+- **SD Card**: Uses `sdpausecmd`, `sdresumecmd`, `sdstopcmd`. [src/components/Panels/Status.js#184-192](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L184-L192)
+- **TFT SD/USB**: Uses `tftsd*` and `tftusb*` command variants. [src/components/Panels/Status.js#220-250](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L220-L250)
+
+**Sources**: [src/components/Panels/Status.js#72-166](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L72-L166)[src/targets/Printer3D/Marlin/TargetContext.js#187-215](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L187-L215)
+
+---
+
+## TemperaturesPanel Component
+
+The `TemperaturesPanel` provides a unified interface for monitoring and controlling all heating elements. [src/components/Panels/Temperatures.js#106-146](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L106-L146)
+
+### Heater Control Logic
+
+The panel uses `target_temperatures` to track user input locally before sending commands. [src/components/Panels/Temperatures.js#42-46](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L42-L46)
+
+- **Validation**: Inputs are validated against `extrudermax`, `bedmax`, or `chambermax` settings. [src/components/Panels/Temperatures.js#172-202](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L172-L202)
+- **Command Generation**: Commands are generated using the `heaterCommand` helper, which replaces placeholders (`#` for index, `$` for value). [src/components/Panels/Temperatures.js#84-96](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L84-L96)
+
+### Temperature Tool Mapping
+
+Data is categorized by tool prefix:
+
+- `T`: Extruders [src/components/Panels/Temperatures.js#43](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L43-L43)
+- `B`: Heated Bed [src/components/Panels/Temperatures.js#44](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L44-L44)
+- `C`: Chamber [src/components/Panels/Temperatures.js#45](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L45-L45)
+- `R`: Redundant sensors [src/components/Panels/Temperatures.js#99](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L99-L99)
+- `M`: Motherboard [src/components/Panels/Temperatures.js#99](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L99-L99)
+
+**Sources**: [src/components/Panels/Temperatures.js#42-104](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L42-L104)[src/components/Panels/Temperatures.js#148-163](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Temperatures.js#L148-L163)
+
+---
+
+## ChartsPanel Component
+
+The `ChartsPanel` uses the `SmoothieChart` library to provide real-time graphical monitoring of temperatures and sensors. [src/components/Panels/Charts.js#235-260](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Charts.js#L235-L260)
+
+### Chart Organization
+
+Data is distributed across three distinct chart instances to maintain readability: [src/components/Panels/Charts.js#55-97](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Charts.js#L55-L97)
+
+1. **Chart 0**: Extruders (`T`) and Redundant sensors (`R`).
+2. **Chart 1**: Bed (`B`), Chamber (`C`), Probe (`P`), and Motherboard (`M`).
+3. **Chart 2**: Custom Sensors (`S`).
+
+### Data Buffering
+
+`TargetContext` maintains a `temperaturesList` and `sensorDataList` with a maximum size of `MAX_TEMPERATURES_LIST_SIZE` (400 entries). [src/targets/Printer3D/Marlin/TargetContext.js#78-121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L78-L121)
+
+- **add2TemperaturesList**: Appends new data and shifts the array if it exceeds the limit. [src/targets/Printer3D/Marlin/TargetContext.js#114-121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L114-L121)
+
+**Sources**: [src/components/Panels/Charts.js#55-136](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Charts.js#L55-L136)[src/targets/Printer3D/Marlin/TargetContext.js#108-121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L108-L121)
+
+---
+
+## Implementation Details: Marlin Filter System
+
+The monitoring panels rely on the `filters.js` file in each target directory to parse raw firmware strings.
+
+### Code Entity Association
+
+This diagram maps firmware strings to the internal functions that update the UI state.
+
+[Flowchart Diagram]
+
+### Regex Implementation Examples
+
+- **Temperatures**: Matches Marlin format `T:.*\s@:[0-9]*`. [src/targets/Printer3D/Marlin/filters.js#44-47](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/filters.js#L44-L47)
+- **Positions**: Matches coordinate strings `X:\s*[+,-]?[0-9]*\.?[0-9]+?\s*Y:...`. [src/targets/Printer3D/Marlin/filters.js#86-90](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/filters.js#L86-L90)
+- **Print Progress**: Parses SD byte counts `SD\sprinting\sbyte\s([0-9]*)\/([0-9]*)`. [src/targets/Printer3D/Marlin/filters.js#109](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/filters.js#L109-L109)
+
+**Sources**: [src/targets/Printer3D/Marlin/filters.js#44-117](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/filters.js#L44-L117)[src/targets/Printer3D/Marlin/TargetContext.js#177-210](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L177-L210)
+
+---
+
+## Time Estimation Logic
+
+The `TargetContext` includes an `estimatedTime` function used by the `StatusPanel` to calculate the "Time Left" display. [src/targets/Printer3D/Marlin/TargetContext.js#142-156](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L142-L156)
+
+```
+const estimatedTime = (progress, time) => {
+ // 1. Convert elapsed time object to total seconds
+ const total = (time.day * 86400) + (time.hour * 3600) + (time.min * 60) + time.sec;
+ // 2. Extrapolate total time based on progress percentage
+ const totalSecondsLeft = (total * (100 - progress)) / progress;
+ // 3. Return formatted time object
+ return { day, hour, min, sec };
+}
+```
+
+**Sources**: [src/targets/Printer3D/Marlin/TargetContext.js#142-156](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/TargetContext.js#L142-L156)[src/components/Panels/Status.js#29-65](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Status.js#L29-L65)
+
+---
+
+# 5.3-Control-Panels
+
+# Control Panels
+Relevant source files
+
+- [src/components/Controls/Fields/Input.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js)
+- [src/components/Helpers/components.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/components.js)
+- [src/components/Helpers/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/index.js)
+- [src/components/Panels/Files.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js)
+- [src/components/Panels/Jog.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js)
+- [src/components/Panels/JogCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogCNC.js)
+- [src/components/Panels/JogPlotter.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogPlotter.js)
+- [src/components/Panels/LaserCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/LaserCNC.js)
+- [src/components/Panels/Notifications.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Notifications.js)
+- [src/components/Panels/OverridesCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/OverridesCNC.js)
+- [src/components/Panels/ProbeCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js)
+- [src/components/Panels/SpindleCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js)
+- [src/style/components/_control.scss](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/style/components/_control.scss)
+- [src/tabs/interface/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js)
+
+## Purpose and Scope
+
+This document describes the **Control Panels** subsystem in ESP3D-WEBUI. Control Panels are interactive UI components that allow users to directly control machine hardware functions such as jogging axes, operating spindles, lasers, probes, and extruders. This page covers:
+
+- The architecture and structure of control panels.
+- The mapping between UI controls and firmware commands.
+- The implementation of specific panels: `JogPanel`, `SpindlePanel`, `LaserPanel`, and `ProbePanel`.
+- The data flow between user inputs, validation logic, and HTTP command dispatch.
+
+---
+
+## Overview of Control Panels
+
+Control Panels are specialized UI panels that provide direct, real-time control over machine hardware. They are primarily located in `src/components/Panels/`.
+
+**Diagram: Control Panel Types and Code Entities**
+
+[Flowchart Diagram]
+
+Sources: [src/components/Panels/JogCNC.js#28-35](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogCNC.js#L28-L35)[src/components/Panels/SpindleCNC.js#28-31](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js#L28-L31)[src/components/Panels/LaserCNC.js#24-27](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/LaserCNC.js#L24-L27)[src/components/Panels/ProbeCNC.js#28-31](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L28-L31)
+
+---
+
+## Control Panel Architecture
+
+Control panels follow a consistent pattern for handling user interaction and machine feedback:
+
+1. **State Management**: Panels use `useTargetContext` to access machine positions, states (Idle, Run, Hold), and pins [src/components/Panels/JogCNC.js#118-119](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogCNC.js#L118-L119)
+2. **Input Validation**: Local state or refs (e.g., `spindleSpeedValue`) store user inputs. Validation is often handled via the `Field` component or local `hasError` functions [src/components/Panels/ProbeCNC.js#109-111](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L109-L111)
+3. **Command Dispatch**: Commands are sent via `createNewRequest` using the `espHttpURL("command", {cmd: ...})` helper [src/components/Panels/SpindleCNC.js#110-114](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js#L110-L114)
+4. **Variable Substitution**: Commands often contain placeholders (e.g., `M3 S#`). These are processed by `replaceVariables` using `variablesList.commands` before being sent [src/components/Panels/LaserCNC.js#106-113](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/LaserCNC.js#L106-L113)
+
+### Common UI Components
+
+- **`ButtonImg`**: Used for icon-based controls like directional arrows [src/components/Controls/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/index.js)
+- **`Field`**: Wraps inputs (Number, Slider, Select) with labels and tooltips [src/components/Controls/Fields/Input.js#83-101](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js#L83-L101)
+- **`PositionsControls`**: A sub-component used across jog panels to display real-time coordinates (MPos/WPos) without re-rendering the entire panel [src/components/Panels/JogCNC.js#50-112](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogCNC.js#L50-L112)
+
+---
+
+## Jog Panels
+
+The Jog system is split into multiple implementations based on machine type:
+
+- **`JogCNC.js`**: Supports standard CNC axes (X, Y, Z) and extended axes (A, B, C, U, V, W) [src/components/Panels/JogCNC.js#41-43](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogCNC.js#L41-L43)
+- **`JogPlotter.js`**: Tailored for sand tables and plotters, including Pen Up/Down controls [src/components/Panels/JogPlotter.js#81-100](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogPlotter.js#L81-L100)
+- **`Jog.js`**: Standard 3D printer jogging [src/components/Panels/Jog.js#69](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js#L69-L69)
+
+### Jog Logic Flow
+
+When a user clicks a jog button:
+
+1. The `clickBtn` or `sendJogCommand` function is triggered [src/components/Panels/Jog.js#122](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js#L122-L122)
+2. Distance and Feedrate are retrieved from UI state (`jogDistance`, `currentFeedRate`) [src/components/Panels/Jog.js#126-129](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js#L126-L129)
+3. A G-code string is constructed (e.g., `G91\nG1 X10 F3000\nG90`) and dispatched [src/components/Panels/Jog.js#130-135](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js#L130-L135)
+
+---
+
+## Spindle and Laser Panels (CNC)
+
+These panels manage secondary machine heads.
+
+### Spindle Panel (`SpindleCNC.js`)
+
+Controls rotation and cooling.
+
+- **Commands**: `M3` (CW), `M4` (CCW), `M5` (Stop), `M7`/`M8` (Coolant) [src/components/Panels/SpindleCNC.js#121-179](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js#L121-L179)
+- **Dynamic Updates**: Uses `eventsList.on("reset", ...)` to handle firmware resets [src/components/Panels/SpindleCNC.js#53](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js#L53-L53)
+- **State Display**: Shows current `spindle_speed`, `feed_rate`, and `spindle_mode`[src/components/Panels/SpindleCNC.js#55-64](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js#L55-L64)
+
+### Laser Panel (`LaserCNC.js`)
+
+Controls laser power and testing.
+
+- **Test Fire**: Allows firing the laser for a specific duration (`lasertestduration`) at a set power percentage (`laserPercentage`) [src/components/Panels/LaserCNC.js#88-92](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/LaserCNC.js#L88-L92)
+- **Power Scaling**: Calculates actual PWM values by multiplying `laserMaxPower` by `laserPercentage`[src/components/Panels/LaserCNC.js#192-196](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/LaserCNC.js#L192-L196)
+
+---
+
+## Probe Panel (`ProbeCNC.js`)
+
+The Probe Panel facilitates tool length offsets and work surface detection.
+
+- **Axis Selection**: Users can select which axis to probe (X, Y, Z, A, B, C) based on visibility settings [src/components/Panels/ProbeCNC.js#140-185](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L140-L185)
+- **Pin Monitoring**: Displays the real-time state of the Probe pin (`P`) [src/components/Panels/ProbeCNC.js#60-78](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L60-L78)
+- **G-Code Types**: Supports multiple probing commands like `G38.2` (Probe toward workpiece, stop on contact) [src/components/Panels/ProbeCNC.js#102-104](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L102-L104)
+
+**Diagram: Probing Data Flow**
+
+[Flowchart Diagram]
+
+Sources: [src/components/Panels/ProbeCNC.js#113-130](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L113-L130)[src/components/Panels/ProbeCNC.js#55-59](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L55-L59)[src/components/Helpers/strings.js#39](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/strings.js#L39-L39)
+
+---
+
+## UI Styling and Components
+
+The visual representation of these panels relies on the `_control.scss` stylesheet and specialized field components.
+
+### CSS Patterns
+
+- **Layout**: `.buttons-bar` and `.image-button-bar` use flexbox for aligning control buttons [src/style/components/_control.scss#1-7](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/style/components/_control.scss#L1-L7)
+- **Special Buttons**: `.emergency-btn` provides high-visibility red styling for stop commands [src/style/components/_control.scss#68-82](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/style/components/_control.scss#L68-L82)
+- **Input Groups**: `.field-group` and `.field-group-content` manage the spacing of labels and inputs [src/style/components/_control.scss#162-199](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/style/components/_control.scss#L162-L199)
+
+### Input Component (`Input.js`)
+
+The `Input` component is the workhorse for control panels. It handles:
+
+- **Dependency Tracking**: Automatically hides/shows inputs based on other settings using `checkDependencies`[src/components/Controls/Fields/Input.js#156-165](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js#L156-L165)
+- **Type Handling**: Supports `text`, `number`, `password` (with reveal toggle), and `slider`[src/components/Controls/Fields/Input.js#190-206](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js#L190-L206)
+- **Shortkeys**: Allows capturing key combinations for jog movements [src/components/Controls/Fields/Input.js#112-135](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js#L112-L135)
+
+Sources: [src/components/Controls/Fields/Input.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js)[src/style/components/_control.scss](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/style/components/_control.scss)[src/components/Helpers/components.js#149-167](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/components.js#L149-L167)
+
+---
+
+## Key Points for Developers
+
+1. **Haptic Feedback**: Most button interactions trigger `useUiContextFn.haptic()` for touch device support [src/components/Controls/Fields/Input.js#47](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Controls/Fields/Input.js#L47-L47)
+2. **Context Dependencies**: Panels must be wrapped in `TargetContextProvider` to receive the real-time data needed for `PositionsControls`[src/targets/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/index.js)
+3. **Command Echoing**: When sending commands, an `echo` parameter is often passed to `createNewRequest` so the Terminal panel can display the sent command [src/components/Panels/JogPlotter.js#121](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogPlotter.js#L121-L121)
+4. **Conditional Visibility**: Panels use `checkDependencies` to ensure controls for hardware not present (e.g., a 4th axis `A`) are hidden [src/components/Panels/ProbeCNC.js#182-185](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L182-L185)
+
+Sources: [src/components/Panels/JogPlotter.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogPlotter.js)[src/components/Panels/SpindleCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/SpindleCNC.js)[src/components/Helpers/components.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/components.js)
+
+---
+
+# 5.4-File-Manager-Panel
+
+# File Manager Panel
+Relevant source files
+
+- [src/components/Helpers/http.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/http.js)
+- [src/components/Panels/Files.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js)
+- [src/components/Panels/Jog.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Jog.js)
+- [src/components/Panels/JogCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogCNC.js)
+- [src/components/Panels/JogPlotter.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/JogPlotter.js)
+- [src/components/Panels/Notifications.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Notifications.js)
+- [src/components/Panels/OverridesCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/OverridesCNC.js)
+- [src/tabs/interface/importHelper.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/importHelper.js)
+- [src/targets/CNC/GRBL/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/GRBL/index.js)
+- [src/targets/CNC/grblHAL/DIRECTSD-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/DIRECTSD-source.js)
+- [src/targets/CNC/grblHAL/FLASH-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js)
+- [src/targets/CNC/grblHAL/files.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js)
+- [src/targets/CNC/grblHAL/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/index.js)
+- [src/targets/CNC/grblHAL/realCommandsTable.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/realCommandsTable.js)
+- [src/targets/CNC/grblHAL/translations/en.json](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/translations/en.json)
+- [src/targets/CNC/translations/en.json](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/translations/en.json)
+- [src/targets/Printer3D/Marlin-embedded/SD-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin-embedded/SD-source.js)
+- [src/targets/Printer3D/Marlin/SD-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js)
+- [src/targets/Printer3D/Marlin/SDEXT-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SDEXT-source.js)
+
+## Purpose and Scope
+
+The File Manager Panel (`FilesPanel`) provides a unified interface for browsing, uploading, downloading, and managing files across multiple storage backends. These backends include internal flash memory (FLASH), SD cards accessed via serial protocol (SD, SDEXT), SD cards accessed via HTTP (DIRECTSD), and TFT display storage (TFTSD, TFTUSB).
+
+This document focuses on the **FilesPanel** component implementation and the **file system abstraction layer** it integrates with, explaining how file operations are abstracted, routed to appropriate storage backends, and executed.
+
+For information about the panel system architecture and visibility management, see [Panel System](/org/luc-github/wiki/luc-github/ESP3D-WEBUI/page/5.1?branch=%223.0%22). For details on the HTTP communication layer, see [Client-Server Communication](/org/luc-github/wiki/luc-github/ESP3D-WEBUI/page/2.2?branch=%223.0%22).
+
+---
+
+## FilesPanel Component Overview
+
+The `FilesPanel` component is a functional Preact component that manages the state of the file browser, including the current path, file list cache, and loading status. It adapts its interface based on the supported file systems of the active target.
+
+**Key Features:**
+
+- **Filesystem Selector**: Populated by `files.supported` after checking dependencies like `flashfs` or `directsd`[src/targets/CNC/grblHAL/files.js#26-47](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L26-L47)
+- **State Management**: Tracks `filePath`, `fileSystem`, and `filesList` using Preact hooks [src/components/Panels/Files.js#72-76](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L72-L76)
+- **Cache System**: Uses `filesListCache` to store directory contents, minimizing redundant network requests [src/components/Panels/Files.js#50](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L50-L50)
+- **Context Integration**: Consumes `useUiContext` for modals/toasts and `useTargetContextFn` for data processing [src/components/Panels/Files.js#78-79](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L78-L79)
+
+**Sources:**[src/components/Panels/Files.js#57-84](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L57-L84)[src/targets/CNC/grblHAL/files.js#26-47](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L26-L47)
+
+---
+
+## Architecture Overview
+
+The File Manager Panel operates through a three-tier architecture:
+
+1. **UI Layer**: The `FilesPanel` component handles user interactions and displays file listings.
+2. **Abstraction Layer**: The target-specific `files` object provides `capability()` and `command()` functions.
+3. **Backend Layer**: Storage backend implementations (e.g., `FLASH-source.js`, `SD-source.js`) handle protocol-specific operations.
+
+**FilesPanel Integration Architecture**
+
+[Flowchart Diagram]
+
+**Sources:**[src/components/Panels/Files.js#115-136](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L115-L136)[src/targets/CNC/grblHAL/files.js#49-74](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L49-L74)[src/targets/CNC/grblHAL/FLASH-source.js#53-60](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L53-L60)[src/targets/Printer3D/Marlin/SD-source.js#84-89](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L84-L89)
+
+---
+
+## File System Abstraction Layer
+
+### The `files` Object
+
+Each target (e.g., `grblHAL`, `Marlin`) exports a `files` object. This object is the primary interface for the `FilesPanel`.
+
+| | | |
+| --- | --- | --- |
+| `supported` | Array of available filesystems | Filters based on `depend()` functions [src/targets/CNC/grblHAL/files.js#26-47](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L26-L47) |
+| `capability()` | Checks feature support | Proxies to backend `capabilities` object [src/targets/CNC/grblHAL/files.js#59-66](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L59-L66) |
+| `command()` | Generates action objects | Returns `{ type, url, cmd, args }`[src/targets/CNC/grblHAL/files.js#68-74](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L68-L74) |
+
+**Sources:**[src/targets/CNC/grblHAL/files.js#77-82](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L77-L82)[src/targets/Printer3D/Marlin/files.js#123-127](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/files.js#L123-L127)
+
+### The `capability()` Function
+
+The `FilesPanel` calls `capability()` to determine which UI elements to display (e.g., Upload button, New Folder button).
+
+**Panel Logic Example:**
+The panel checks if the current filesystem supports `IsFlatFS` to decide whether to render hierarchical navigation or a simple list [src/components/Panels/Files.js#156-167](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L156-L167)
+
+**Backend Implementation (grblHAL FLASH):**
+
+```
+const capabilities = {
+ Upload: () => true,
+ Download: () => true,
+ DeleteFile: () => true,
+ CreateDir: () => true,
+ IsFlatFS: () => false
+}
+```
+
+**Sources:**[src/targets/CNC/grblHAL/FLASH-source.js#24-51](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L24-L51)[src/targets/CNC/grblHAL/files.js#59-66](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L59-L66)
+
+### The `command()` Function
+
+The `command()` function generates execution instructions. The `FilesPanel` processes the returned object based on its `type`.
+
+**Execution Flow in FilesPanel:**
+
+1. **type: "url"**: Calls `sendURLCmd(cmd)` which uses `createNewRequest` to perform an HTTP fetch [src/components/Panels/Files.js#115-136](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L115-L136)
+2. **type: "cmd"**: Calls `sendSerialCmd(command)` which sends G-code/System commands to the firmware [src/components/Panels/Files.js#94-113](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L94-L113)
+
+**Sources:**[src/components/Panels/Files.js#94-136](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L94-L136)[src/targets/CNC/grblHAL/files.js#68-74](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L68-L74)
+
+---
+
+## Data Flow: Listing Files
+
+The following diagram traces the data flow from a user clicking "Refresh" to the UI updating with new file entries.
+
+```mermaid
+sequenceDiagram
+ participant UI as "FilesPanel.js"
+ participant API as "files.js"
+ participant BE as "DIRECTSD-source.js"
+ participant Srv as "ESP32 Backend"
+ UI->>API: command(fs | "list" | path)
+ API->>BE: commands.list(path)
+ BE-->>UI: { type: "url", url: "sdfiles", args: {action: "list"} }
+ UI->>Srv: GET /sdfiles?path=/&action=list
+ Srv-->>UI: JSON String (FileList)
+ UI->>API: command(fs | "formatResult" | response)
+ API->>BE: commands.formatResult(response)
+ BE->>BE: JSON.parse()
+ BE->>BE: sortedFilesList() if enabled
+ BE-->>UI: { files: [...], status: "ok" }
+ UI->>UI: setFilesList(data)
+```
+
+**Sources:**[src/components/Panels/Files.js#115-136](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/Files.js#L115-L136)[src/targets/CNC/grblHAL/DIRECTSD-source.js#54-76](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/DIRECTSD-source.js#L54-L76)[src/targets/Printer3D/Marlin/SD-source.js#114-122](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L114-L122)
+
+---
+
+## Storage Backend Comparison
+
+### FLASH (Internal)
+
+- **Protocol**: HTTP [src/targets/CNC/grblHAL/FLASH-source.js#57](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L57-L57)
+- **Capabilities**: Full support for directories, multiple uploads, and downloads [src/targets/CNC/grblHAL/FLASH-source.js#24-51](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L24-L51)
+- **Pathing**: Uses `HostUploadPath` setting to prefix paths [src/targets/CNC/grblHAL/FLASH-source.js#63](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L63-L63)
+
+### SD / SDEXT (Serial)
+
+- **Protocol**: Serial (G-code) [src/targets/Printer3D/Marlin/SD-source.js#87](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L87-L87)
+- **Capabilities**: Usually flat filesystem; upload/delete depends on `SerialProtocol` (e.g., "MKS" support) [src/targets/Printer3D/Marlin/SD-source.js#61-75](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L61-L75)
+- **Parsing**: Requires `formatFileSerialLine` to parse raw serial strings like `Begin file list...End file list`[src/targets/Printer3D/Marlin/SD-source.js#31-53](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L31-L53)
+
+### DIRECTSD (HTTP-to-SD)
+
+- **Protocol**: HTTP [src/targets/CNC/grblHAL/DIRECTSD-source.js#58](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/DIRECTSD-source.js#L58-L58)
+- **Capabilities**: Supports hierarchical directories and native downloads [src/targets/CNC/grblHAL/DIRECTSD-source.js#30-51](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/DIRECTSD-source.js#L30-L51)
+- **Integration**: Specific to targets like grblHAL or Marlin with specific SD connection modes [src/targets/CNC/grblHAL/files.js#38-46](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/files.js#L38-L46)
+
+---
+
+## Response Processing and Parsing
+
+For serial backends, the system must detect the start and end of a file list in the stream. This is defined in `responseSteps`.
+
+**Example: Marlin SD Response Detection**
+
+```
+const responseSteps = {
+ list: {
+ start: (data) => data.startsWith("Begin file list"),
+ end: (data) => data.startsWith("End file list"),
+ error: (data) => data.indexOf("error") != -1 || data.indexOf("No SD card") != -1
+ }
+}
+```
+
+The `FilesPanel` uses these via the `processor` to "catch" the serial response and aggregate it into a content array before calling `formatResult`[src/targets/Printer3D/Marlin/SD-source.js#155-170](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L155-L170)
+
+**Sources:**[src/targets/Printer3D/Marlin/SD-source.js#155-176](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js#L155-L176)[src/targets/Printer3D/Marlin/SDEXT-source.js#157-178](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SDEXT-source.js#L157-L178)
+
+---
+
+## Summary Table of File Commands
+
+| | | |
+| --- | --- | --- |
+| **List** | `url` | `GET /files?path=/&action=list`[src/targets/CNC/grblHAL/FLASH-source.js#57](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L57-L57) |
+| **Upload** | `url` | `POST /files?path=/`[src/targets/CNC/grblHAL/FLASH-source.js#61](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L61-L61) |
+| **Delete** | `url` | `GET /files?path=/&action=delete&filename=f.nc`[src/targets/CNC/grblHAL/FLASH-source.js#87](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L87-L87) |
+| **Play** | `cmd` | `replace("#", path)` in `playcmd` setting [src/targets/CNC/grblHAL/FLASH-source.js#115](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L115-L115) |
+| **Create Dir** | `url` | `GET /files?path=/&action=createdir&filename=new`[src/targets/CNC/grblHAL/FLASH-source.js#92](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L92-L92) |
+
+**Sources:**[src/targets/CNC/grblHAL/FLASH-source.js#53-129](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/FLASH-source.js#L53-L129)[src/targets/CNC/grblHAL/DIRECTSD-source.js#54-120](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/CNC/grblHAL/DIRECTSD-source.js#L54-L120)
+
+---
+
+# 5.5-Settings-Interface
+
+# Settings Interface
+Relevant source files
+
+- [src/components/Helpers/http.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Helpers/http.js)
+- [src/components/Panels/ProbeCNC.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js)
+- [src/hooks/useSettings.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/hooks/useSettings.js)
+- [src/tabs/interface/importHelper.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/importHelper.js)
+- [src/tabs/interface/index.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js)
+- [src/targets/Printer3D/Marlin-embedded/SD-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin-embedded/SD-source.js)
+- [src/targets/Printer3D/Marlin/SD-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SD-source.js)
+- [src/targets/Printer3D/Marlin/SDEXT-source.js](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/targets/Printer3D/Marlin/SDEXT-source.js)
+
+The Settings Interface is the UI component that provides users with a comprehensive form-based editor for viewing, modifying, validating, and persisting application preferences. It renders all configurable settings organized by category, performs real-time validation, manages dependency-based field visibility, and handles import/export/save operations.
+
+For information about the underlying preferences data structure and hierarchical inheritance system, see [Preferences System](/org/luc-github/wiki/luc-github/ESP3D-WEBUI/page/4.2?branch=%223.0%22). For details on individual field component implementations, see [Field Components](/org/luc-github/wiki/luc-github/ESP3D-WEBUI/page/5.7?branch=%223.0%22). For information about settings validation rules and dependency logic, see [Settings Validation and Dependencies](/org/luc-github/wiki/luc-github/ESP3D-WEBUI/page/7.4?branch=%223.0%22).
+
+## Component Architecture
+
+The `InterfaceTab` component serves as the main orchestrator for the settings interface, coordinating between the settings context, field rendering, validation logic, and persistence operations.
+
+[Flowchart Diagram]
+
+**Sources:**[src/tabs/interface/index.js#20-102](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L20-L102)[src/tabs/interface/index.js#336-416](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L336-L416)
+
+## Settings Data Structure
+
+The settings interface operates on a nested data structure where each setting field contains metadata for rendering, validation, and state tracking.
+
+[Flowchart Diagram]
+
+**Field Object Structure:**
+
+| | | |
+| --- | --- | --- |
+| `id` | string | Unique identifier for the field |
+| `type` | string | Field type: text, number, select, boolean, icon, list, group |
+| `label` | string | Translation key for field label |
+| `value` | any | Current field value |
+| `initial` | any | Original/default value for change detection |
+| `hasmodified` | boolean | Whether value differs from initial |
+| `haserror` | boolean | Whether validation has failed |
+| `depend` | array | Dependency conditions for visibility/validity |
+| `min`, `max` | number | Range constraints for numbers/text length |
+| `step` | number | Increment step for number inputs |
+| `regexpattern` | string | Validation regex for text inputs |
+| `options` | array | Available options for select fields |
+| `hide` | boolean | Whether to hide the field |
+| `shortkey` | boolean | Whether this is a keyboard shortcut field |
+
+**Sources:**[src/tabs/interface/index.js#45-299](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L45-L299)[src/tabs/interface/importHelper.js#30-167](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/importHelper.js#L30-L167)
+
+## Validation System
+
+The validation system provides comprehensive real-time validation for all field types via `generateValidationGlobal`.
+
+[Flowchart Diagram]
+
+**Validation Rules by Field Type:**
+
+| | |
+| --- | --- |
+| `shortkey` | Must not end with "+"; must be unique across jog keymap and macros [src/tabs/interface/index.js#60-102](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L60-L102) |
+| `number` | Must satisfy min/max range; handles `minSecondary` for dual-range validation [src/tabs/interface/index.js#166-189](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L166-L189) |
+| `text` | Must match `regexpattern` if provided; must satisfy min/max length constraints [src/tabs/interface/index.js#136-165](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L136-L165) |
+| `select` | Selected option must be valid; option dependencies must be satisfied [src/tabs/interface/index.js#191-203](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L191-L203) |
+| `list` | Stringified check for `newItem` or `hasmodified` flags; check for `haserror` in nested items [src/tabs/interface/index.js#119-135](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L119-L135) |
+| `all types` | Step validation using modulo arithmetic with float precision handling [src/tabs/interface/index.js#104-118](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L104-L118) |
+
+**Sources:**[src/tabs/interface/index.js#45-299](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L45-L299)
+
+## Dependency System
+
+The dependency system controls field visibility and validity based on other settings values or connection capabilities using `checkDependencies`.
+
+[Flowchart Diagram]
+
+**Sources:**[src/tabs/interface/index.js#40-43](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L40-L43)[src/components/Panels/ProbeCNC.js#148-165](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L148-L165)[src/tabs/interface/importHelper.js#79-128](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/importHelper.js#L79-L128)
+
+## Action Buttons and Save Workflow
+
+The interface provides actions for refreshing, importing, exporting, and saving settings.
+
+### Save Implementation
+
+The save operation uploads modified settings to the device as a `preferences.json` file.
+
+1. **File Creation**: [src/tabs/interface/index.js#384-400](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L384-L400)
+- Uses `exportPreferences()` with `false` flag to exclude unmodified values.
+- Creates a `Blob` and wraps it in a `File` object.
+2. **FormData Structure**:
+
+- `path`: Host upload path.
+- `creatPath`: Set to "true".
+- `myfiles`: The generated JSON file.
+3. **HTTP Request**: [src/tabs/interface/index.js#402-415](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L402-L415)
+- Method: POST via `createNewRequest`.
+- Reloads the page on success to apply changes.
+
+### Import/Export
+
+- **Export**: Generates a JSON blob containing settings, custom content, and extensions [src/tabs/interface/index.js#636-655](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L636-L655)
+- **Import**: Uses `FileReader` to read local JSON and `importPreferencesSection` to merge data [src/tabs/interface/index.js#342-380](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L342-L380)
+
+**Sources:**[src/tabs/interface/index.js#336-416](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/index.js#L336-L416)[src/tabs/interface/exportHelper.js#1-10](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/exportHelper.js#L1-L10)[src/tabs/interface/importHelper.js#1-10](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/tabs/interface/importHelper.js#L1-L10)
+
+## Practical Usage in Panels
+
+Panels like `ProbePanel` leverage the settings validation logic to ensure machine commands are safe.
+
+**Field Rendering with Validation:**[src/components/Panels/ProbeCNC.js#583-637](https://github.com/luc-github/ESP3D-WEBUI/blob/97c01e85/src/components/Panels/ProbeCNC.js#L583-L637)
+
+```
+