Okay, this is a good starting point, but it's very long and a bit rambling. LLMs work best with clear, concise instructions. Here's a breakdown of the issues and how I'll address them, followed by the revised prompt.
Issues & Reasoning for Changes:
- Length: The prompt is too long. LLMs have context windows, and a lot of this is conversational ("think again," "reflect back"). We want instructions, not a dialogue.
- Repetition: "Pixel perfect" and similar phrases are repeated. Once is enough.
- Future Considerations: While mentioning the future Python integration is good context, it's distracting now. The focus is on the UI build. We can add that back in a later prompt.
- Figma Dependency: The constant "contact the Figma MCP server" is unrealistic for an LLM. We need to assume the LLM has access to the design information (you'd provide that separately, likely through a file upload or a link). We can ask it to consider the design details, but not to actively "contact" a server.
- Ambiguity: "Smoothly with an animation" is vague. "IOS like animation" is better, but still could be more specific.
- State Management: The state descriptions are good, but could be more structured.
- Confidence Threshold: The "95% sure" clause is unnecessary and doesn't help the LLM. It's better to focus on how to achieve accuracy.
- Whitespace: Describing the whitespace as "just white space" is unnecessary. The dimensions are enough.
- Tone: The tone is overly cautious and self-reflective ("think again," "reflect back"). We want a confident plan.
Revised Prompt:
Develop a detailed action plan to build a React.js user interface with a FastAPI backend, designed to eventually control camera variables via a Python program. Focus *solely* on the UI implementation in this plan.
**Design Specifications:**
The UI must precisely replicate the design provided in the Figma MCP design files (assume access is granted). Prioritize pixel-perfect accuracy. Utilize the provided SVG icons from the "icons" folder.
* **Overall Layout:** The sidebar will be 171px wide and 1600px high with a pitch-black background. The remaining area (2389x1600 pixels) will be a blank white canvas, reserved for the future camera feed.
* **Button States & Functionality (React Components):**
* **cooling_button:** 4 states (0, 1, 2, 3) – Cycle through states on each click.
* **heating_button:** 4 states (0, 1, 2, 3) – Cycle through states on each click.
* **gain_switch:** 2 states (LCG, HCG) – Toggle between states on each click.
* **denoising_button:** 4 states (0, 25, 50, 75) – Cycle through states on each click.
* **high_ful_well_button:** 2 states (0, 1) – Toggle between states on each click.
* **low_noise_mode_button:** 2 states (0, 1) – Toggle between states on each click.
* **zoom_bar_switch:** Start at 1x. Allow smooth transitions (using modern iOS-style animations) to 3x, 5x, and 10x zoom levels.
* **record_button:** Initial state: not pressed (0). On click, transition to pressed state (1) and remain in that state until clicked again, returning to state 0.
* **shutter_button:** Initial state: not pressed (0). On click, briefly animate to the pressed state (1) using an iOS camera shutter animation, then immediately return to state 0.
**Action Plan Requirements:**
1. **Component Breakdown:** List all necessary React components (e.g., `CoolingButton`, `HeatingButton`, `ZoomBar`, etc.).
2. **State Management:** Describe the chosen state management approach (e.g., useState, Context API, Redux).
3. **Styling:** Detail how the UI will be styled to match the Figma design (e.g., CSS Modules, Styled Components).
4. **Animation Implementation:** Specify the libraries or techniques used to create the iOS-style animations.
5. **FastAPI Integration (Placeholder):** Briefly outline how the React components will eventually make API requests to the FastAPI backend (no actual backend code is needed at this stage).
6. **Development Order:** Provide a logical order for building the components, starting with the most fundamental elements.
7. **Testing Strategy:** Describe how you will ensure pixel-perfect replication of the Figma design.
Focus on a clear, executable plan. Assume access to all design assets.