Skip to content

Conversation

@jpblancoder
Copy link
Contributor

@jpblancoder jpblancoder commented Sep 25, 2025

Greetings Arc XP, this PR including some additions for counting chains and adjustments to some queries.

Changes included

  1. Create help.sh file, to echo quick help to terminal. Without having to reference the available scipts elsewhere.

  2. Create gui.sh file, to open the DuckDB Local UI, and view the "_tmpview.db" file.

  3. Add new "chain" block related scripts. That report similiar info as the "feature" scripts.

  • all-chains-usage.sh
  • find-pages-by-chain-name.sh
  1. Update existing script, to print the page's "chain" blocks, in addition to the "feature" blocks.
  • describe-page-or-template.sh
  1. Update existing script, to correctly count the (chain, feature, content sources) instances.
    The previous counts were way to high, counting the totals from all revisions, and not just the one page.
    The current counts for "Print Features" and "Print Chains" look correct to me now.
  • describe-page-or-template.sh
  • all-content-sources-usage.sh

Content Sources issue

The previous and current counts for "Print Content Sources" (for features) are always zero, regardless of the page. I believe there is a flaw in the logic for this DB query. I suspect that feature blocks don't actually store their content source service name in the root contentService property.

Instead, they are stored under the customFields object. The query would need to be updated to recursively search for the contentService property, within all custom fields. However, my MongoDB query skills aren't very good.

Feature blocks can have multiple content sources associated with them. Each having a unique custom field name.

@jpblancoder jpblancoder marked this pull request as ready for review September 25, 2025 20:10
@mfyz
Copy link
Collaborator

mfyz commented Oct 2, 2025

Thanks for these improvements @jpblancoder. I've tested them and they look great, merging.

@mfyz mfyz merged commit bbe94ff into arcxp:main Oct 2, 2025
@jpblancoder jpblancoder deleted the tgam-chains branch October 2, 2025 16:09
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.

2 participants