--- title: One Card Flow permalink: /futureproof/one-card-flow/ description: We took on the challenge of refining Pipulate, starting with a simple OneCardFlow focused on a single, humble textarea for user input, generated by o1 Pro. After a hefty coding session, we emerged with a far superior version. Then, leveraging o1 Pro's analytical muscle, we dissected the improvements, forging a blueprint for future workflows. The key takeaways? Consistency and user experience. Now, we're ready to further optimize Pipulate by centralizing common code, making it even leaner and more powerful. It all started with that textarea, and it's leading to a much more robust framework. meta_description: "Discover One Card Flow—a minimal pipeline workflow with a single textarea input refined by Pipulate for streamlined state management." meta_keywords: one card flow, pipulate, pipeline workflow, minimal design, textarea input, server-side state, HTMX, workflow blueprint, state management, consistent UX, single card, automation, Jupyter Notebook layout: post sort_order: 1 --- {% raw %} ## Getting Started with OneCardFlow I'm ready to get started with OneCardFlow. A lot can be done with just one card, and my earlier temptation was to jump into Anywidget and start with the integrations straight away. But you know what's more fundamental? You know what the muscle memory habits I'm trying to get into my finger are? You know the one version of state that can be client-side that's okay? If it's not server-side cookies with my dict-like-DB object, then you know what it could still be client-side without any friggin JavaScript library or session state tracking nonsense, yet still be valid for a card? ## The DOM and HTMX It's called the DOM, aka document object model. Whether I want to pretend it or not, it's still there, and it still can be manipulated, and so long as a page refresh doesn't occur, it's still persistent in the single page application mode in which these pipeline workflows exist. Consequently, it is HTMX that I need to learn and get better at. Consequently, it is the examples on these two key very important pages that I need to pay attention to: [htmx.org/reference/](https://htmx.org/reference/) and [htmx.org/examples/](https://htmx.org/examples/). Not to hard to remember, but easy to forget. The music of the pipes is greatly the sound of HTMX. ### Server-Side State and Forms And so consequently, even with my `.cursorrules` cursing of server-side state, the state of the matter is that I can affect server-side state with HTMX in a web form, and that is valid. That is a valid way to collect multiple points of data, the number of which I do not really know ahead of time in a single card. If I want to collect anywhere from 1 to 100 items for a list of indeterminate size, ***we can do that on a single card*** using the example... the example... the example... oddly, there is none. There's an example to [delete a row](https://htmx.org/examples/delete-row/) and to [edit a row](https://htmx.org/examples/edit-row/) but not to ***add a row***, haha! It's almost like fate is answering my mini-app vs. textarea element. And this in itself should be a little lesson for me. ### The Table Generation Dilemma First, so what? If I wanted a little app that adds rows to an HTML table, I totally could do that. Recently in the creation of the CSV file browser I added the [dominate](https://pypi.org/project/dominate/) PyPI (pip installable) package to make making old school HTML tables easy, and thus have now mixed the upper-case [FastHTML component names that shadow HTML element names](https://github.com/AnswerDotAI/fasthtml/blob/main/fasthtml/components.py) Huh? Yeah, it takes me a moment to wrap my head around what I did. But I have one set of Python functions when I code that come from FastHTML called FT components. They're all listed here and they give me a bunch of functions that will help me build tables: 'Tbody', 'Td', 'Tfoot', 'Th', 'Thead', and 'Tr', but I used dominate which does almost the same thing with lower-case versions ***because AI told me to*** because it was trained on `dominate` before it was trained on `fasthtml`, and I was too dumb to spot it in time. Duhhhh. ### The Library Mismatch Adventure And then I went and tried to fix... and discovered a rabbit hole that is best avoided, and so I am going to leave the `dominate` import in place and the use of it to construct the CSV file browser. But I made some discoveries along the way worth sharing. This was my prompt to Claude: **Me**: Read my @.cursorrules And then look at these functions to draw a little CSV file browser. And then look at @[components.py](https://github.com/AnswerDotAI/fasthtml/blob/main/fasthtml/components.py). Now why would I use @[dominate](https://pypi.org/project/dominate/) when I have FastHTML FT components? Consider `from fasthtml.common import * ` which already brings all the FT components we need into global namespace as clean HTML-named-like Python functions per @[fasthtml/fastapp.py](https://github.com/AnswerDotAI/fasthtml/blob/main/fasthtml/fastapp.py) which imports @[basics.py](https://github.com/AnswerDotAI/fasthtml/blob/main/fasthtml/basics.py) which imports @[components.py](https://github.com/AnswerDotAI/fasthtml/blob/main/fasthtml/components.py) which dumps the following into global: ```python __all__ = ['named', 'html_attrs', 'hx_attrs', 'hx_attrs_annotations', 'show', 'attrmap_x', 'ft_html', 'ft_hx', 'File', 'fill_form', 'fill_dataclass', 'find_inputs', 'html2ft', 'sse_message', 'A', 'Abbr', 'Address', 'Area', 'Article', 'Aside', 'Audio', 'B', 'Base', 'Bdi', 'Bdo', 'Blockquote', 'Body', 'Br', 'Button', 'Canvas', 'Caption', 'Cite', 'Code', 'Col', 'Colgroup', 'Data', 'Datalist', 'Dd', 'Del', 'Details', 'Dfn', 'Dialog', 'Div', 'Dl', 'Dt', 'Em', 'Embed', 'Fencedframe', 'Fieldset', 'Figcaption', 'Figure', 'Footer', 'Form', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Head', 'Header', 'Hgroup', 'Hr', 'Html', 'I', 'Iframe', 'Img', 'Input', 'Ins', 'Kbd', 'Label', 'Legend', 'Li', 'Link', 'Main', 'Map', 'Mark', 'Menu', 'Meta', 'Meter', 'Nav', 'Noscript', 'Object', 'Ol', 'Optgroup', 'Option', 'Output', 'P', 'Picture', 'PortalExperimental', 'Pre', 'Progress', 'Q', 'Rp', 'Rt', 'Ruby', 'S', 'Samp', 'Script', 'Search', 'Section', 'Select', 'Slot', 'Small', 'Source', 'Span', 'Strong', 'Style', 'Sub', 'Summary', 'Sup', 'Table', 'Tbody', 'Td', 'Template', 'Textarea', 'Tfoot', 'Th', 'Thead', 'Time', 'Title', 'Tr', 'Track', 'U', 'Ul', 'Var', 'Video', 'Wbr'] ``` ## The Great Library API Mismatch ...to which Claude has great responses and I try to clean up the CSV file browser to unify on the FastHTML pseudo-HTML tags versus the dominate ones... and it just all explodes in my face. Their APIs are totally different, and I have a strong sense of "if it ain't broken, don't fix it". I have other fish to fry tonight, and this is exactly the kind of rabbit hole that needlessly burns up all your decision fatigue energy, which ends up making you defer the work that you really wanted to do in the first place (the work that ***could make all the difference***) to another day—and which is ultimately, self-defeating. ## Late Night Realizations What's even worse and more insulting to this whole getting-started for the day (at 11:00 PM at night, haha) is that the HTMX table-manipulation that I got so infatuated with pursuing, the key example for implementing happens to be the one left off the htmx.org site, can all be avoided if only I... if only I... if only I... ### The Simple Solution Just use a textarea box instead of some micro to-do app, hahaha! Headsmack! --- ## Post-Realization Rubber Ducking with o1 Pro > Rubber Ducky o1 Pro's the one! > That master-planner is so much fun! > And OpenAI's hoping people won't peep > Or seek too deeply how DeepSeek is cheap! **o1 Pro**: Yes—sometimes a simple `