Remove Scenes, group beats by multiple characters; strip comments repo-wide
Drop the Scene entity/grouping in favor of chapters carrying prose directly and beats belonging to many characters. Add markdown editor + character multi-select components to the web client. Remove all XML doc and inline comments across the touched C#/TS/CSS files in favor of self-documenting names, and record that convention in CLAUDE.md. Add .mcp.json (local MCP server config, no secrets) and ignore .idea/.
This commit is contained in:
@@ -3,7 +3,6 @@ using Novelly.Api.Chapters;
|
||||
using Novelly.Api.Characters;
|
||||
using Novelly.Api.Common;
|
||||
using Novelly.Api.Projects;
|
||||
using Novelly.Api.Scenes;
|
||||
|
||||
namespace Novelly.Api.Tests;
|
||||
|
||||
@@ -69,19 +68,18 @@ public class ProjectDataTests : ServiceTestFixture
|
||||
public async Task Word_count_is_recomputed_whenever_prose_changes()
|
||||
{
|
||||
var projectId = await NewProjectAsync();
|
||||
var chapter = await Chapters.CreateAsync(projectId, new CreateChapterRequest("Landfall"));
|
||||
|
||||
var scene = await Scenes.CreateAsync(chapter.Id, new CreateSceneRequest(
|
||||
"The dock at dawn", Prose: "Five words go right here"));
|
||||
var chapter = await Chapters.CreateAsync(projectId, new CreateChapterRequest(
|
||||
"Landfall", Prose: "Five words go right here"));
|
||||
|
||||
Assert.That(scene.WordCount, Is.EqualTo(5));
|
||||
Assert.That(chapter.WordCount, Is.EqualTo(5));
|
||||
|
||||
var rewritten = (await Scenes.UpdateAsync(scene.Id, new UpdateSceneRequest(
|
||||
var rewritten = (await Chapters.UpdateAsync(chapter.Id, new UpdateChapterRequest(
|
||||
Prose: "Now\nthere are seven words in total")))!;
|
||||
|
||||
Assert.That(rewritten.WordCount, Is.EqualTo(7));
|
||||
|
||||
var cleared = (await Scenes.UpdateAsync(scene.Id, new UpdateSceneRequest(Prose: "")))!;
|
||||
var cleared = (await Chapters.UpdateAsync(chapter.Id, new UpdateChapterRequest(Prose: "")))!;
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
@@ -91,14 +89,13 @@ public class ProjectDataTests : ServiceTestFixture
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task Scene_updates_that_omit_prose_leave_the_draft_untouched()
|
||||
public async Task Chapter_updates_that_omit_prose_leave_the_draft_untouched()
|
||||
{
|
||||
var projectId = await NewProjectAsync();
|
||||
var chapter = await Chapters.CreateAsync(projectId, new CreateChapterRequest("Landfall"));
|
||||
var scene = await Scenes.CreateAsync(chapter.Id, new CreateSceneRequest(
|
||||
"The dock at dawn", Prose: "The tide came in slow."));
|
||||
var chapter = await Chapters.CreateAsync(projectId, new CreateChapterRequest(
|
||||
"Landfall", Prose: "The tide came in slow."));
|
||||
|
||||
var updated = (await Scenes.UpdateAsync(scene.Id, new UpdateSceneRequest(Status: DraftStatus.Revised)))!;
|
||||
var updated = (await Chapters.UpdateAsync(chapter.Id, new UpdateChapterRequest(Status: DraftStatus.Revised)))!;
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
@@ -109,12 +106,11 @@ public class ProjectDataTests : ServiceTestFixture
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task Deleting_a_project_takes_its_characters_chapters_and_scenes()
|
||||
public async Task Deleting_a_project_takes_its_characters_and_chapters()
|
||||
{
|
||||
var projectId = await NewProjectAsync();
|
||||
await Characters.CreateAsync(projectId, new CreateCharacterRequest("Ines"));
|
||||
var chapter = await Chapters.CreateAsync(projectId, new CreateChapterRequest("Landfall"));
|
||||
await Scenes.CreateAsync(chapter.Id, new CreateSceneRequest("The dock at dawn"));
|
||||
await Chapters.CreateAsync(projectId, new CreateChapterRequest("Landfall"));
|
||||
|
||||
await Projects.DeleteAsync(projectId);
|
||||
|
||||
@@ -125,7 +121,6 @@ public class ProjectDataTests : ServiceTestFixture
|
||||
Assert.That(await verification.Projects.CountAsync(), Is.EqualTo(0));
|
||||
Assert.That(await verification.Characters.CountAsync(), Is.EqualTo(0));
|
||||
Assert.That(await verification.Chapters.CountAsync(), Is.EqualTo(0));
|
||||
Assert.That(await verification.Scenes.CountAsync(), Is.EqualTo(0));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user