Surface arcs, character beats and open questions in the web client

The character page gains three sections under the dossier: the arc as an
editable ordered table with each stage pinnable to a chapter, every beat the
character appears in across the book (each row linking into that chapter's
outline), and the character's open questions. The sidebar groups main
characters above supporting ones, and both the sheet and the add dialog let you
set importance.

The arc section shows for main characters, and also for supporting ones that
already have stages — demoting someone should not hide work they thought they
had lost.

The outline page gains a notes section and an open-questions section at the
bottom. Beat rows are now anchored so the character page can link straight to a
row. Raising a question from either page attaches it to what that page is
about, and the section hides the association it is already scoped to rather
than repeating "Landfall" on every row.

Also fixes an ordering wart the browser run exposed: both CharacterRole and
CharacterImportance are stored as text, so ordering them in SQL ordered the
spelling — "Deuteragonist" beat "Protagonist" and the sidebar put the second
lead above the character the book is about. Listing now sorts after
materialising, which uses the enums' declaration order. The test for it was
checked both ways: it fails on the SQL ordering and passes on the fix.

73 tests pass, the web client builds and lints clean. Driven in a browser
end to end: resolving a question with "also add to notes" drops it off the open
list and appends the decision under the chapter's existing note, "show
resolved" brings it back with a Reopen button, and a beat link on the character
page lands on the right chapter outline at that beat's anchor.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S56bfZMGe1hnhpWP4CjjNw
This commit is contained in:
James Wampler
2026-08-06 12:11:20 -07:00
co-authored by Claude Opus 5
parent 0358667679
commit 4f396bb5f9
10 changed files with 840 additions and 29 deletions
+19 -1
View File
@@ -17,7 +17,8 @@ public class CharacterArcTests : ServiceTestFixture
_projectId = Projects.CreateAsync(new CreateProjectRequest("The Salt Road")).Result.Id;
_characterId = Characters.CreateAsync(
_projectId,
new CreateCharacterRequest("Ines", Importance: CharacterImportance.Main)).Result.Id;
new CreateCharacterRequest("Ines", CharacterRole.Protagonist, CharacterImportance.Main))
.Result.Id;
}
[Test]
@@ -60,6 +61,23 @@ public class CharacterArcTests : ServiceTestFixture
Is.EqualTo(new[] { "Ines", "Mara", "Zeno" }));
}
[Test]
public async Task Within_a_group_the_lead_comes_before_the_second_lead()
{
// Both enums are stored as text, so ordering them in SQL orders the spelling and
// "Deuteragonist" beats "Protagonist" — burying the character the book is about.
await Characters.CreateAsync(_projectId, new CreateCharacterRequest(
"Mara", CharacterRole.Deuteragonist, CharacterImportance.Main));
await Characters.CreateAsync(_projectId, new CreateCharacterRequest(
"Anders", CharacterRole.Antagonist, CharacterImportance.Main));
var listed = await Characters.ListAsync(_projectId);
Assert.That(
listed.Select(c => c.Name),
Is.EqualTo(new[] { "Ines", "Anders", "Mara" }));
}
[Test]
public async Task Arc_stages_are_appended_in_order_and_read_back_that_way()
{