Skip to main content

max / quasi

Emit the plain description meta a search engine reads 1e35bc8a. Screen::summarised reached og:description and twitter:description and stopped, so a described document emitted the pair a share sheet reads and left the host to append the one a search engine reads. MNW's /pricing was doing that through Shell::head -- an escape hatch spending itself on something a described property already carries. Under indexable, unlike the social pair: a screen that has told crawlers not to index it gains nothing by describing itself to them, while a noindex page can still be linked and still owes a share sheet a preview. Measured before choosing the gate: MNW's five embeds, the case where a search description would be wrong, call summarised nowhere and so emit nothing either way. The gate is what keeps that true when one starts.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session
https://claude.ai/code/session_0136sbU8F6i9WrcvA3wn4Lgk
Author: Max Johnson <me@maxj.phd> · 2026-08-29 17:43 UTC
Signed with PGP, not checked
Commit: 1be61d1efda486c04727dae64d6b6cd0e9912862
Parent: 2072bce
3 files changed, +75 insertions, -5 deletions
M Cargo.lock +4 -4
@@ -6211,10 +6211,6 @@
6211 6211 "winnow 1.0.4",
6212 6212 ]
6213 6213
6214 - [[patch.unused]]
6215 - name = "synckit-client"
6216 - version = "0.10.0"
6217 -
6218 6214 [[patch.unused]]
6219 6215 name = "kberg"
6220 6216 version = "0.1.0"
@@ -6234,3 +6230,7 @@
6234 6230 [[patch.unused]]
6235 6231 name = "quasi-type"
6236 6232 version = "0.1.3"
6233 +
6234 + [[patch.unused]]
6235 + name = "synckit-client"
6236 + version = "0.10.0"
@@ -996,6 +996,28 @@
996 996 named("twitter:image", image);
997 997 }
998 998
999 + // The plain one, which is what a search engine reads. The pair above is
1000 + // what a share sheet reads, and `base.html` emitted all three off one
1001 + // string; a described document emitted two and left the host to append
1002 + // the third through `Shell::head`, which is an escape hatch spending
1003 + // itself on something the description already carries.
1004 + //
1005 + // Under `indexable`, unlike the social pair, and the asymmetry is the
1006 + // point: a screen that has told crawlers not to index it has nothing to
1007 + // gain from describing itself to them, while a noindex page can still
1008 + // be linked and still owes a share sheet a preview.
1009 + //
1010 + // Measured 2026-08-29 before choosing the gate: MNW's five embeds -- an
1011 + // iframe widget is the case where a search description would be wrong,
1012 + // since it would compete with the page framing it -- call `summarised`
1013 + // nowhere, so they emit nothing either way. The gate is what keeps that
1014 + // true when one of them starts.
1015 + if discovery.indexable
1016 + && let Some(summary) = &discovery.summary
1017 + {
1018 + named("description", summary);
1019 + }
1020 +
999 1021 if !discovery.indexable {
1000 1022 named("robots", "noindex");
1001 1023 }
@@ -2878,12 +2878,60 @@
2878 2878 assert!(!html.contains("robots"), "{html}");
2879 2879
2880 2880 // A None emits nothing rather than an empty tag. A preview showing a blank
2881 - // line reads as a broken page.
2881 + // line reads as a broken page, and an empty `description` is a page telling
2882 + // a search engine it is about nothing.
2882 2883 assert!(!html.contains("og:description"), "{html}");
2884 + assert!(!html.contains("name=\"description\""), "{html}");
2883 2885 assert!(!html.contains("og:image"), "{html}");
2884 2886 assert!(!html.contains("canonical"), "{html}");
2885 2887 }
2886 2888
2889 + /// `1e35bc8a`. One summary, three tags: the pair a share sheet reads and the
2890 + /// plain one a search engine reads. MNW's `base.html` emitted all three and the
2891 + /// described document emitted two, so `/pricing` was appending the third
2892 + /// through `Shell::head`.
2893 + #[test]
2894 + fn a_summary_reaches_the_plain_description_meta_and_not_only_the_social_pair() {
2895 + let html = render(&Screen::sidebar_content("Pricing").summarised("What you keep."));
2896 +
2897 + assert!(
2898 + html.contains("<meta name=\"description\" content=\"What you keep.\">"),
2899 + "{html}"
2900 + );
2901 + // Beside the pair rather than instead of it. All three say the same thing
2902 + // and are read by different things.
2903 + assert!(
2904 + html.contains("<meta property=\"og:description\" content=\"What you keep.\">"),
2905 + "{html}"
2906 + );
2907 + assert!(
2908 + html.contains("<meta name=\"twitter:description\" content=\"What you keep.\">"),
2909 + "{html}"
2910 + );
2911 + }
2912 +
2913 + /// A screen that has told crawlers to go away has nothing to gain from
2914 + /// describing itself to them -- but a noindex page can still be linked, so the
2915 + /// share sheet keeps its preview. The asymmetry is deliberate.
2916 + #[test]
2917 + fn a_screen_that_refuses_indexing_keeps_its_preview_and_drops_its_description() {
2918 + let html = render(
2919 + &Screen::sidebar_content("Downloads")
2920 + .summarised("Your purchases.")
2921 + .indexed(false),
2922 + );
2923 +
2924 + assert!(!html.contains("name=\"description\""), "{html}");
2925 + assert!(
2926 + html.contains("<meta property=\"og:description\" content=\"Your purchases.\">"),
2927 + "{html}"
2928 + );
2929 + assert!(
2930 + html.contains("<meta name=\"robots\" content=\"noindex\">"),
2931 + "{html}"
2932 + );
2933 + }
2934 +
2887 2935 #[test]
2888 2936 fn a_purchased_content_screen_can_say_it_is_not_for_crawlers() {
2889 2937 // Six of the server's screens. This is the assertion the whole decision