Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(search): index every word Foundation's sections show, published or not - #1613

Merged
gregpriday merged 5 commits into
developfrom
bugfix/issue-1351-site-search-index-omits-most-foundation
Nov 28, 2026
Merged

gregpriday merged 5 commits into
developfrom
bugfix/issue-1351-site-search-index-omits-most-foundation

Conversation

@gregpriday

Copy link
Copy Markdown
Member

Resolves #1351

The cases in the issue's steps (the Business starter's hero, Services cards, testimonials, call to action, Contact FAQs, and a content.media bullet) were already indexed on develop, through #1376's canvas-marker reading. Foundation text without a canvas marker was still missing: the bento's featured card, both prices and notes of the billing switch, a tab's name, the plan comparison's plans, prices and notes, table cells, and the article header and News rows. A publication also lost every Foundation outline: it strips the editor's markers, so the regenerated site no longer matched the bundled definitions. That emptied the published Markdown copies (#1350) of Foundation's words.

Changes

  • pageText (src/generator/search.ts) keeps every line renderedContent gives, in the same order, and adds the words of a second walkRendered pass. That pass reads Foundation's sections through the same outline designs the Markdown copies use (shipped-outlines.ts), and reads the theme's table and plan comparison directly. It includes panels the page ships while hidden (an unchosen tab) and leaves out what is hidden at every size or a button that goes nowhere. Each section's words go in before its layer's other lines; table and comparison words go in after them. The result is a superset of the old index, so the existing exclusions (Site search's own box copy, gated frame titles and initials, form copy) are unchanged.
  • rendersAsShipped (src/engine/shipped-copy.ts) also accepts the bundled definition with its editor markers removed, the way a publication carries it, compared exactly as supplied. shippedOutline and the Markdown comparison gate use it, so the published index and the published Markdown copies keep Foundation's words. shippedAsIs still governs what the editor may change.
  • Table and comparison words are read only from the definitions as the app ships them.
  • The two it.fails search tests in articles.test.ts (article header, News list) now pass as ordinary tests.

Testing

  • New tests: Foundation words without markers (bento, toggle, comparison with a hidden price part and its third plan, table heading before cells), checked through the generated search-index.js and a search; the same index after marker stripping; design text around page slot content in order; a 15,000-row table (the earlier merge overflowed the stack); rendersAsShipped held byte-equal to withoutCodeMarkers for every bundled Foundation component, rejecting a changed source, name or default; published Markdown copies, including a comparison, equal the editor's.
  • Each new search and publication test fails on the code before its fix.
  • Impact set: 27 of 623 unit test files (4%), all green. typecheck:changed green.
  • Open (Low): search excerpts can put a comparison's closing note before its plans, and a section that shows nothing else, placed in a design's slot, after the design's closing text. Matching and ranking read every line, so only the order of words in an excerpt changes.

@gregpriday

Copy link
Copy Markdown
Member Author

Unit tests on a391573 failed in two files, neither reached by this change (which touches only src/generator/search.ts, markdown.ts, shipped-outlines.ts, src/engine/shipped-copy.ts and their tests):

  • tests/unit/interaction-coverage.test.ts › "covers every discoverable action…": No row has the route "item:Posts:Show full titles" (defined at src/renderer/src/panels/PostsPanel.tsx:784). It fails the same way on origin/develop (base-level): the Posts panel's "Show full titles" action needs a row in tests/coverage/interactions.ts.
  • tests/unit/photo-import.test.ts: four image-copy tests hit their 60 s timeout on the runner. The file passes locally on this branch, so the failures look like runner load.

Every other affected test file passed (624 of 628).

…vas marker, published or not

- Read Foundation's sections for site search through the designs that stand for their markup, as the Markdown copies do, with the theme's table cells and plan comparison
- Read a section whose code only lost the editor's markers to a publication as shipped, so the published index and Markdown copies keep its words
- Group the search lines by the page's layer, a Foundation section's in the order its outline shows them
- Turn the article header and News list search tests into ordinary tests
- Hold the Markdown copies of a publication to the editor's
…eme's own table

- Insert a Foundation section's words before its layer's others and a table's or comparison's after them, keeping the order of the rest
- Read table cells only from the table as the app ships it
- Cover slot order, hidden prices, the third plan, a published comparison's Markdown and a changed default
- Walk the layers the second pass finds once, from a cursor
- Add lines one at a time, so a large table cannot overflow the stack
@gregpriday
gregpriday force-pushed the bugfix/issue-1351-site-search-index-omits-most-foundation branch from 59daea7 to 444595e Compare November 28, 2026 09:43
@gregpriday
gregpriday merged commit 6639df5 into develop Nov 28, 2026
1 check passed
@gregpriday
gregpriday deleted the bugfix/issue-1351-site-search-index-omits-most-foundation branch November 28, 2026 09:50
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.

Site search index omits most Foundation sections and Content with image bullet points

1 participant