🪲 Bugs
Open

Mentions containing code blocks cannot be collapsed

Mentions containing large code blocks do not collapse, causing severe rendering and navigation problems

Description

I frequently store reusable prompts in code blocks using the text language. This is currently the most practical way to preserve and copy a large block of text from Capacities.

When an object containing one of these code blocks appears in the Mentions section at the bottom of another object, the mention cannot be collapsed as expected. The full code block remains expanded and rendered.

If a page has many such mentions, Capacities loads and displays the complete contents of every code block. This creates two problems:

Performance: The page becomes slow because it renders a large amount of text and many code-block components.

Navigation: The Mentions section becomes practically unusable. Finding a specific mention requires scrolling through enormous blocks of text, and the boundaries between mentions are easy to miss during fast scrolling.

Steps to reproduce

Create an object containing a large code block with its language set to text.

Mention or link another object from that object so the source appears in the target object’s Mentions section.

Open the target object.

Scroll to the Mentions section.

Attempt to collapse the mention containing the code block.

Actual behavior

The mention does not fully collapse. The code block remains expanded or otherwise prevents the mention preview from collapsing, leaving all of its text rendered.

Expected behavior

A mention should collapse regardless of which block types it contains. When collapsed, none of the content inside the mention—including code blocks—should remain rendered or occupy vertical space.

Ideally, collapsed mentions should also avoid mounting or rendering their internal block components until expanded.

Impact

This becomes severe on objects with many mentions containing reusable prompts. The Mentions section becomes slow, extremely long, and difficult to navigate, defeating its purpose as a way to inspect references to an object.

Workaround

None that preserves both the prompt formatting and convenient copying. Avoiding code blocks makes large prompts harder to reuse, while retaining them makes Mentions pages difficult to use.

0 Comments

Sign in to comment

No comments yet. Be the first to share your thoughts!