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:
@@ -10,14 +10,11 @@ using Novelly.Api.Data;
|
||||
using Novelly.Api.Imports;
|
||||
using Novelly.Api.Projects;
|
||||
using Novelly.Api.Questions;
|
||||
using Novelly.Api.Scenes;
|
||||
using Novelly.Api.Tags;
|
||||
using Serilog;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// AddSerilog (not UseSerilog) so it becomes an additional logging provider rather than
|
||||
// replacing the one AddServiceDefaults wires up for the Aspire dashboard.
|
||||
builder.Services.AddSerilog((services, config) => config
|
||||
.ReadFrom.Configuration(builder.Configuration)
|
||||
.ReadFrom.Services(services)
|
||||
@@ -28,8 +25,6 @@ builder.Services.AddNovelly(builder.Configuration);
|
||||
builder.Services.AddOpenApi();
|
||||
builder.Services.AddProblemDetails();
|
||||
|
||||
// Enums travel as their names, so the React client and the MCP server both read
|
||||
// "Protagonist" rather than an ordinal that shifts whenever the enum is reordered.
|
||||
builder.Services.ConfigureHttpJsonOptions(options =>
|
||||
options.SerializerOptions.Converters.Add(new JsonStringEnumConverter()));
|
||||
|
||||
@@ -43,16 +38,11 @@ builder.Services.AddCors(options => options.AddDefaultPolicy(policy => policy
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Local-first tool: bring the SQLite file up to date on boot rather than making the
|
||||
// writer run a migration command before they can open the app.
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
await scope.ServiceProvider.GetRequiredService<NovelDbContext>().Database.MigrateAsync();
|
||||
}
|
||||
|
||||
// Serilog's request logging wraps the exception handler (registered first = outermost)
|
||||
// so it reads the status code the handler already resolved, rather than seeing the raw
|
||||
// exception fly past and misreporting a handled 404 as a 500.
|
||||
app.UseSerilogRequestLogging();
|
||||
|
||||
app.UseExceptionHandler(handler => handler.Run(async context =>
|
||||
@@ -95,7 +85,6 @@ app.MapProjectEndpoints()
|
||||
.MapCharacterEndpoints()
|
||||
.MapChapterEndpoints()
|
||||
.MapBeatEndpoints()
|
||||
.MapSceneEndpoints()
|
||||
.MapTagEndpoints()
|
||||
.MapOpenQuestionEndpoints()
|
||||
.MapAgentEndpoints()
|
||||
@@ -103,5 +92,4 @@ app.MapProjectEndpoints()
|
||||
|
||||
app.Run();
|
||||
|
||||
/// <summary>Exposed so the tests can spin the API up with WebApplicationFactory.</summary>
|
||||
public partial class Program;
|
||||
|
||||
Reference in New Issue
Block a user