Skip to content

JSX version, symlinked to jsx branch of apostrophe - #151

Merged
boutell merged 17 commits into
mainfrom
jsx
Sep 11, 2026
Merged

boutell merged 17 commits into
mainfrom
jsx

Conversation

@boutell

@boutell boutell commented Apr 28, 2026

Copy link
Copy Markdown
Member

No description provided.

@myovchev myovchev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The app is crashing for me. Some findings:

  • Demo templates call helpers on the wrong object. Multiple .jsx templates use apos.helper.*, apos.pager.* but in JSX those addHelpers helpers live on the helpers arg, not the real apos arg (see my in-code comment)
  • Piece single-page URLs are missing. It might or might not be related to the above
  • JSX hot-reload does not work although it was advertised to work in the core. The nodemon watcher correctly refuses to restart the process, but until I restart the process I see a template parse errors after page reload (tried to add text to the card widget)
  • unrelated probably, I'm not sure if it's regression or old "sins" - the 500 page has actually 200 OK status.

<Template
templateName="link.jsx"
label={widget.linkText}
path={apos.helper.linkPath(widget)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This and tons of helpers related code fails, crashing the app for me.
It looks to me that apos.helper references to the module methods (native server side apos reference) and not the the nunjucsk synthetic one. The solution that kinda works is destructing helpers instead apos and helpers.helper.linkPath(widget) does the job. I'm not sure what the core intent is here (similar to nunjucks behavior or full self.apos access).
I see similar errors in apos.pager.pageRange() .

@boutell

boutell commented May 27, 2026 via email

Copy link
Copy Markdown
Member Author

@boutell
boutell requested a review from myovchev May 27, 2026 12:42
@boutell

boutell commented May 27, 2026

Copy link
Copy Markdown
Member Author

Hi Miro,

Yikes, I apologize for breaking this so much at the last minute. At one point "apos" was the fake nunjucks apos and I realized that was not in agreement with the tech design, but I obviously forgot to fix the templates to match.

You should now be able to have a much better experience.

However I have not looked into why the watchers don't work yet.

@boutell

boutell commented May 29, 2026

Copy link
Copy Markdown
Member Author

The issues you flagged are ready for re-evaluation, watchers included. Be sure to pull in both repos.

@myovchev myovchev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Everything works now out of the box. All previously discovered issues are gone. Watchers also work as expected.

@boutell

boutell commented Jun 2, 2026

Copy link
Copy Markdown
Member Author

This has been approved, but we're not replacing nunjucks as the default in Q2, so it will remain as a separate sample.

BoDonkey and others added 3 commits September 3, 2026 07:34
CLAUDE.md pointed at AGENTS.md with a markdown link, which Claude Code's
@-import parser doesn't recognize — AGENTS.md was never actually loaded
into context. Switch to a real @AGENTS.md import per the canonical
guidance (https://code.claude.com/docs/en/memory#agents-md).

Also have AGENTS.md name-drop ARCHITECTURE.md and explain its role, per
PR review feedback, without @-importing it (it's long prose largely
overlapping AGENTS.md's tables, not worth loading every session).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1R6qsqGA2kcR2zWN1PrTk
// the widget's limit and display options.

export default function (data, { Component }) {
export default function ({ widget: { limit, display } }, { Component }) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure if the widget data is guaranteed (thinking of widget preview). The destructing here has no default object fallback and default values

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The widget property will exist, otherwise widget preview would be impossible. Only valid values ever get passed to widget preview. I think we're good on that.

Comment thread AGENTS.md
@@ -0,0 +1,327 @@
# AGENTS.md — public-demo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a WAY too large AGENTS instruction file - keep in mind it's consulted on every prompt.
This should be kept extremely brief, only general instructions like code style and architecture, the rest can be handled by skills.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A good point about context-busting.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually @myovchev I tried a token estimator which put this at under 4,000 tokens. Maybe worthwhile, to understand the project well enough to produce good results consistently.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Based on my experiments, brief AGENTS + SKILLS + (private list of the things that happened - features, bug fixes, etc) specs history performs much better with less tokens. Keep in mind this 6k are on top of many many more coming with Claude clients.

@boutell

boutell commented Sep 9, 2026 via email

Copy link
Copy Markdown
Member Author

@boutell
boutell marked this pull request as ready for review September 11, 2026 12:19
@boutell
boutell merged commit 84746a6 into main Sep 11, 2026
2 checks passed
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.

3 participants