previous code was assuming too much the context of the data structure.
in chat the AST works on a single node base (?), in notebook on a
multi node base.
this commit move the previous code from inside the single stitch function to
the area where the final AST is stitched together.
This still leaves an empty root node which does not take up visual
space though. A more comprehensive approach would be to filter out
plain URL links from the graph, eg from the function
```
t[1].children.map(c => {
if (c?.children) {
let links = [];
c.children.filter(k => {
if (k.type === 'link') {
links.push({
type: 'root',
children: [
{
type: 'graph-url',
url: k.url
}
]
})
}
})
c.children.push(...links);
}
});
```
this commit suggests a possible UI to put back the rich embed URL
right below (aka in context) the block where the plain URL has been
inserted. in this way when pasting a URL the formatting does not break
and yet a richer UI is still rendered.
as of now, a blockquote would discard any other content after
a URL and would put it on a new line.
eg '> some text https://urbit.org this is urbit' would be rendered as
```
> some text https://urbit.org
this is urbit
```
this commit joins all content inside of a blockquote as one block.
this change removes rich embed URLs in order to not break text flow. eg
when writing a sentence with a URL, before this commit the UI would
display the URL as its own block on a new line, plus anything
afterwards it (originally on the same line of text), would be
displayed on a new line as well.
This undoes some of the code-splitting done previously as it didn't
affect performance enough, and was actively hurting it in some ways.
Instead this moves the subscription initiation higher and adds scries
for critical data. This also shuffles the calls in App's useEffect so
that they are more colocated with relevant concerns.