your-ai-workflow-firebase-os 1.2.37 → 1.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -262,20 +262,31 @@ change the owner can use and a change they cannot.
|
|
|
262
262
|
extra forms, sample data or metrics the owner did not mention. Inside a page
|
|
263
263
|
you design freely — "an impressive hero" is yours to make good — the limit
|
|
264
264
|
is on adding THINGS, not on doing the asked thing well.
|
|
265
|
-
7.
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
265
|
+
7. A page the owner added on their Pages screen ALREADY EXISTS. The sentence
|
|
266
|
+
they paste says so, names its web address and names its one content file —
|
|
267
|
+
write exactly that file and NOTHING else: no config file, no second
|
|
268
|
+
address, nothing to Firestore, and never a reply telling them to create or
|
|
269
|
+
fix anything. Only a page asked for in the chat, one that exists nowhere
|
|
270
|
+
yet, is YOURS to create, and then it is created as FILES — never in
|
|
271
|
+
Firestore: its config file and its content file, both named from the
|
|
272
|
+
page's name — a page called "Client onboarding" is
|
|
273
|
+
\`clientOnboardingTab.config.ts\` plus \`ClientOnboardingContent.tsx\`.
|
|
270
274
|
Nothing else registers a page: no registerPages.ts, no customRoutes, no
|
|
271
|
-
database writes
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
write ONLY its content file, <PascalCase of the page's name>Content.tsx.
|
|
275
|
+
database writes. When a config file already exists for that page or
|
|
276
|
+
address, edit THAT file and its content file — never a second config,
|
|
277
|
+
never a second address. When the address exists but has NO config file
|
|
278
|
+
(the owner made the page in the app), write ONLY its content file.
|
|
276
279
|
Forms are the same: link a form the owner made with
|
|
277
280
|
\`<ContactPopup formId="..." />\` — never remake it. A new
|
|
278
281
|
\`*Form.config.ts\` only when they ask for a NEW form in the chat (rule 5).
|
|
282
|
+
8. Everything you draw must look like the app it lands in. Style with the
|
|
283
|
+
theme only — \`bg-background\`, \`text-foreground\`, \`text-accent\`,
|
|
284
|
+
\`border-[var(--panel-border)]\`, \`glass-panel\`, \`btn-primary\`, and the
|
|
285
|
+
built-in \`Input\` / \`CustomSelect\` for fields — never \`bg-white\`,
|
|
286
|
+
\`bg-gray-900\`, hex colours or a palette of your own: hard-coded fields
|
|
287
|
+
stay dark on the light theme. And NEVER a \`<style>\` tag or any global
|
|
288
|
+
CSS in a component — one global rule restyles and re-pads every page of
|
|
289
|
+
the app at once.
|
|
279
290
|
|
|
280
291
|
Before you answer, re-read the request and this list, and delete anything you
|
|
281
292
|
built that breaks a line of it.
|
|
@@ -297,10 +308,14 @@ stops the build with one sentence that says the fix.
|
|
|
297
308
|
\`Config\`; a content file with no default export; a \`*Form.config.ts\` whose
|
|
298
309
|
\`systemName\` is not the id from its file name; a page config with no
|
|
299
310
|
preset and no matching content file (the page would render empty — the
|
|
300
|
-
error names the exact \`*Content.tsx\` to create)
|
|
311
|
+
error names the exact \`*Content.tsx\` to create); a \`<style>\` tag in a
|
|
312
|
+
content file (global CSS — it restyles and re-pads every page of the app,
|
|
313
|
+
style with theme classes instead).
|
|
301
314
|
- A hand-written form — a \`<form>\` or an \`onSubmit\` in a content file with
|
|
302
315
|
no \`<ContactPopup />\` — prints a warning, because its entries never reach
|
|
303
|
-
the Inbox and never show on the Forms screen.
|
|
316
|
+
the Inbox and never show on the Forms screen. So does a hard-coded colour
|
|
317
|
+
like \`bg-gray-900\` — it ignores the owner's theme and stays dark on the
|
|
318
|
+
light theme.
|
|
304
319
|
|
|
305
320
|
When the build fails, read the sentence, do what it says, build again. Do not
|
|
306
321
|
work around it, do not delete the check, do not touch \`vite.config.ts\`.
|
|
@@ -385,6 +400,23 @@ export default function ProdTimerContent({ config, actions }: { config: any; act
|
|
|
385
400
|
The file is auto-discovered by its name and location. There is no registration
|
|
386
401
|
step, no import to add, and no web address to wire.
|
|
387
402
|
|
|
403
|
+
### The pages that already exist, and the one file each is filled by
|
|
404
|
+
|
|
405
|
+
Three pages already exist and are NEVER created, re-created or re-addressed.
|
|
406
|
+
Each is filled by exactly one file, the same way as any other page:
|
|
407
|
+
|
|
408
|
+
| page | web address | the one file to write |
|
|
409
|
+
| ------------- | ----------- | ------------------------------------------------------------------ |
|
|
410
|
+
| Home | \`/\` | \`src/your-ai-workflow-firebase-os/Home.tsx\` (edit it, do not add one) |
|
|
411
|
+
| Contact | \`/contact\` | \`microcomponents/ContactContent.tsx\` |
|
|
412
|
+
| Support | \`/support\` | \`microcomponents/SupportContent.tsx\` |
|
|
413
|
+
|
|
414
|
+
Contact and Support show their form as a pop-up until one of those files
|
|
415
|
+
exists; the moment it does, the page draws that file instead. So "put the
|
|
416
|
+
contact form INTO the page instead of a pop-up" is one file —
|
|
417
|
+
\`ContactContent.tsx\` rendering \`<ContactPopup isInline formId="contact" />\` —
|
|
418
|
+
and never a new page, a new config file or a new form.
|
|
419
|
+
|
|
388
420
|
## Rules for microcomponents
|
|
389
421
|
|
|
390
422
|
Rules 1-6 apply to microcomponent files only. Rules 7-9 (styling) apply
|
|
@@ -526,22 +558,28 @@ nothing to register, no import to add. The owner then sees it on the Pages
|
|
|
526
558
|
screen (or Forms) where they can rename it, change its web address, hide it,
|
|
527
559
|
reorder it or link a different form. Everything else about it is your job.
|
|
528
560
|
|
|
529
|
-
A page is exactly two files, named from the same name: the config
|
|
530
|
-
content file (\`clientOnboardingTab.config.ts\` +
|
|
531
|
-
for a page called "Client onboarding").
|
|
532
|
-
|
|
533
|
-
|
|
561
|
+
A page you create is exactly two files, named from the same name: the config
|
|
562
|
+
file and the content file (\`clientOnboardingTab.config.ts\` +
|
|
563
|
+
\`ClientOnboardingContent.tsx\` for a page called "Client onboarding").
|
|
564
|
+
|
|
565
|
+
But the Add button on the owner's Pages screen creates the page ITSELF — its
|
|
566
|
+
address, its name, its icon, its starting layout. The sentence that screen
|
|
567
|
+
hands them says the page already exists and names the ONE content file to
|
|
568
|
+
write. When you get that sentence, write exactly that file, nothing else: no
|
|
569
|
+
config file, no second address, and never a message back saying the page must
|
|
570
|
+
be created first. It is already in their menu.
|
|
534
571
|
|
|
535
572
|
CHECK FIRST — before you create anything. When the page they are talking
|
|
536
573
|
about already has a config file, or they name an address that is already
|
|
537
574
|
taken, edit what exists: the config file if there is one, and its content
|
|
538
575
|
file — never a second config, a form or another address for the same page.
|
|
539
576
|
An address with NO config file behind it is a page the owner made inside the
|
|
540
|
-
app
|
|
541
|
-
PascalCase plus \`Content\`. Forms follow the same
|
|
542
|
-
on the Forms screen is linked with
|
|
543
|
-
|
|
544
|
-
in the chat, as in the
|
|
577
|
+
app: write ONLY its content file — the one the owner's sentence names, or
|
|
578
|
+
failing that the page in PascalCase plus \`Content\`. Forms follow the same
|
|
579
|
+
line: a form the owner made on the Forms screen is linked with
|
|
580
|
+
\`<ContactPopup formId="..." />\` and never remade; you write a new
|
|
581
|
+
\`*Form.config.ts\` only when they ask for a new form in the chat, as in the
|
|
582
|
+
examples below.
|
|
545
583
|
|
|
546
584
|
### Step 1 — ask first, build second
|
|
547
585
|
|
|
@@ -659,24 +697,38 @@ Third — a request copied from a page's own row on the Pages screen. The owner
|
|
|
659
697
|
added the page there first (who it is for, its name, its web address, a
|
|
660
698
|
starting layout, its form), then pasted the row's sentence and finished it:
|
|
661
699
|
|
|
662
|
-
> "
|
|
663
|
-
>
|
|
664
|
-
>
|
|
665
|
-
>
|
|
666
|
-
>
|
|
667
|
-
>
|
|
668
|
-
>
|
|
669
|
-
>
|
|
670
|
-
>
|
|
671
|
-
>
|
|
672
|
-
>
|
|
673
|
-
>
|
|
700
|
+
> "My app already has a page called Client onboarding at /onboarding. It is
|
|
701
|
+
> already made and it is already in the menu — do not create a page, a web
|
|
702
|
+
> address or a settings file for it, and do not edit any other file.
|
|
703
|
+
> Write one file:
|
|
704
|
+
> src/your-ai-workflow-firebase-os/microcomponents/ClientOnboardingContent.tsx,
|
|
705
|
+
> with a default export. That file is what the page shows.
|
|
706
|
+
> The page already starts from the board layout — the heading and the saving
|
|
707
|
+
> are already built and stay on the page. Your file draws only what goes
|
|
708
|
+
> inside the panel.
|
|
709
|
+
> Your component receives everything it needs as props: ({ config, actions })
|
|
710
|
+
> — actions.tasks and actions.categories hold the saved items;
|
|
711
|
+
> actions.saveTask(id, data), actions.deleteTask(id),
|
|
712
|
+
> actions.saveCategory(id, data) and actions.deleteCategory(id) change them;
|
|
713
|
+
> actions.openInlineEditor(categoryId, item) opens the built-in editor;
|
|
714
|
+
> actions.user is the signed-in person, and every item you save must include
|
|
715
|
+
> uid: actions.user.uid. Read and change data ONLY through these props — do
|
|
716
|
+
> not import firebase and do not write your own loading, saving or uploading
|
|
717
|
+
> code.
|
|
718
|
+
> Here is what I would like on it: columns, in this order: To do, In
|
|
719
|
+
> progress, Done. Each card has a client name (short text), a contact email,
|
|
720
|
+
> a start date and a short note (long text). Anyone on the team can add a
|
|
721
|
+
> card, drag it between columns, edit it and delete it. The button at the top
|
|
722
|
+
> says New client. No file uploads on this page. Build only this — no other
|
|
723
|
+
> pages, forms or sample cards."
|
|
674
724
|
|
|
675
725
|
Every line is a decision already made. The audience, the web address
|
|
676
726
|
(\`route\`), the name (\`tabName\` / \`pageName\`), the heading (\`tabTitle\` /
|
|
677
|
-
\`pageTitle\`) and "
|
|
678
|
-
Pages screen — read them from the \`config\` your content file receives,
|
|
679
|
-
never write them again.
|
|
727
|
+
\`pageTitle\`) and "already starts from the ... layout" (\`template\`) were set
|
|
728
|
+
on the Pages screen — read them from the \`config\` your content file receives,
|
|
729
|
+
and never write them again. When the sentence lists props, they are real: the
|
|
730
|
+
layout renders your component with exactly those, so a content file that
|
|
731
|
+
ignores them and opens its own Firestore connection is wrong even if it runs. THE FILE NAME RULE: the content file is the page's
|
|
680
732
|
name in PascalCase plus \`Content.tsx\` (a page called "Client onboarding" ->
|
|
681
733
|
\`ClientOnboardingContent.tsx\`); use exactly the name in the request, or the
|
|
682
734
|
page never finds your file. "No file uploads" means draw no upload control;
|