diff --git a/server/src/at_record_server/handlers/edit_inbox.gleam b/server/src/at_record_server/handlers/edit_inbox.gleam index c797250..9f915b7 100644 --- a/server/src/at_record_server/handlers/edit_inbox.gleam +++ b/server/src/at_record_server/handlers/edit_inbox.gleam @@ -35,8 +35,6 @@ import wisp.{type Request, type Response} // a single fixed namespace covers the whole endpoint. const cursor_namespace = "proposals" -// --- GET listEditProposals --- - pub fn list_proposals(req: Request, ctx: Context) -> Response { use id, session <- require_session(req, ctx) use client, session <- with_pds_client(ctx, id, session) @@ -68,8 +66,6 @@ pub fn list_proposals(req: Request, ctx: Context) -> Response { |> wisp.json_response(200) } -// --- POST applyEditProposal --- - pub type ApplyFailure { ProposalNotFound CidMismatch diff --git a/server/src/at_record_server/handlers/shelf.gleam b/server/src/at_record_server/handlers/shelf.gleam index e845b11..0929fa7 100644 --- a/server/src/at_record_server/handlers/shelf.gleam +++ b/server/src/at_record_server/handlers/shelf.gleam @@ -38,8 +38,6 @@ import gleam/result import gleam/string import wisp.{type Request, type Response} -// --- reads --- - pub fn list_shelf(req: Request, ctx: Context) -> Response { use id, session <- require_session(req, ctx) use client, session <- with_pds_client(ctx, id, session) @@ -255,8 +253,6 @@ fn do_purge( } } -// --- writes (each appends one immutable event) --- - pub type AddForm { AddForm( title: String, diff --git a/web/src/at_record_web/pages/crate.gleam b/web/src/at_record_web/pages/crate.gleam index 9a5888c..177becc 100644 --- a/web/src/at_record_web/pages/crate.gleam +++ b/web/src/at_record_web/pages/crate.gleam @@ -42,8 +42,6 @@ pub fn view(model: Model) -> Element(Msg) { } } -// --- loaded ------------------------------------------------------------- - fn loaded_state( view: String, display: Display, @@ -232,8 +230,6 @@ fn format_line(snap: Snapshot) -> String { |> string.join(" / ") } -// --- loading ---------------------------------------------------------------- - fn loading_state(view: String, display: Display) -> Element(Msg) { html.div([attr.class("list-screen")], [ hero("…fetching your records", ctl.badge("◆ LOADING", ctl.Accent)), @@ -274,8 +270,6 @@ fn skeleton_card(dim: Bool) -> Element(Msg) { ]) } -// --- empty ------------------------------------------------------------------ - /// The shelf is fetched per filter view, so an empty load means "this filter /// is empty", not "the crate is empty": only the owned (default) view gets /// the first-run panel, and the toolbar always survives for switching back. @@ -382,8 +376,6 @@ fn vinyl_glyph() -> Element(Msg) { ) } -// --- failed (offline) ------------------------------------------------------- - fn failed_state() -> Element(Msg) { html.div([attr.class("list-screen")], [ hero("couldn't count your records", ctl.badge("✕ OFFLINE", ctl.Alert)), diff --git a/web/src/at_record_web/update.gleam b/web/src/at_record_web/update.gleam index e898585..e15d431 100644 --- a/web/src/at_record_web/update.gleam +++ b/web/src/at_record_web/update.gleam @@ -763,7 +763,6 @@ pub fn update(model: Model, msg: Msg) -> #(Model, Effect(Msg)) { effect.none(), ) - // --- barcode scan --- CameraUnsupported(reason) -> #( Model( ..model, @@ -926,7 +925,6 @@ pub fn update(model: Model, msg: Msg) -> #(Model, Effect(Msg)) { effect.none(), ) - // --- browse --- GotBrowse(Ok(rows)) -> #( Model(..model, browse: rows, busy: False), effect.none(), @@ -1010,7 +1008,6 @@ pub fn update(model: Model, msg: Msg) -> #(Model, Effect(Msg)) { "Could not save that record.", ) - // --- edit inbox --- GotEditInbox(Ok(proposals)) -> #( Model( ..model, diff --git a/web/test/crate_test.gleam b/web/test/crate_test.gleam index 90b4c0f..ef99731 100644 --- a/web/test/crate_test.gleam +++ b/web/test/crate_test.gleam @@ -144,8 +144,6 @@ pub fn clear_notice_drops_it_test() { assert model.notice == None } -// --- crate page empty states --- - pub fn empty_owned_view_shows_first_run_panel_with_toolbar_test() { let html = rendered_empty_crate("owned") assert string.contains(html, "NOTHING IN THE CRATE YET") @@ -180,8 +178,6 @@ pub fn empty_owned_view_omits_the_display_toggle_test() { assert !string.contains(html, "class=\"display-toggle\"") } -// --- crate page loaded state / list display ----------------------------- - pub fn loaded_grid_shows_the_display_toggle_and_cover_cards_test() { let html = rendered_loaded_crate(Grid) assert string.contains(html, "class=\"display-toggle\"") @@ -208,8 +204,6 @@ pub fn loaded_rows_render_title_and_muted_artist_format_meta_test() { assert !string.contains(html, "class=\"cover-card\"") } -// --- app-bar avatar navigation (popout retired) --- - pub fn crate_app_bar_avatar_links_to_settings_test() { let html = view.view(logged_in()) |> element.to_string assert string.contains(html, "href=\"/settings\"") @@ -225,8 +219,6 @@ pub fn crate_app_bar_icon_links_carry_aria_labels_test() { assert string.contains(html, "aria-label=\"Scan barcodes\"") } -// --- crate client-side windowing (LOAD MORE) --- - fn many_entries(n: Int) -> List(Entry) { list.repeat(an_entry(), n) |> list.index_map(fn(e, i) { Entry(..e, entry_id: "e" <> int.to_string(i)) }) @@ -271,8 +263,6 @@ pub fn got_shelf_stores_the_next_cursor_test() { assert updated.crate_cursor == Some("owned:e30") } -// --- server-paginated LOAD MORE (fetch beyond the local window) --- - pub fn show_more_crate_only_fetches_once_the_window_catches_up_to_the_cursor_test() { [ #(60, Some("owned:e59"), False), @@ -361,8 +351,6 @@ pub fn got_shelf_more_error_clears_loading_and_notices_the_user_test() { } } -// --- rendering: LOAD MORE reflects the server cursor + loading state --- - pub fn load_more_shows_when_a_cursor_remains_even_without_local_overflow_test() { let seeded = Model(