# T8: Nesting depth settings per namespace **Status**: resolved **Priority**: low **Source**: meta `137101ac-7eb6-11e7-8b77-040140774501` **Filed**: 2026-02-01 ## Problem Namespace owners want to control: - Maximum nesting depth for replies (currently unlimited) - The depth at which a "load more" button appears instead of inline display ## Proposed Implementation 1. Add namespace columns: `max_nesting_depth` (default NULL = unlimited), `collapse_depth` (default NULL = never collapse) 2. Add fields to namespace settings 3. Enforce max depth in reply views (both web and API) 4. Add collapse logic in templates ## Files - `remarkbox/models/namespace.py` — add columns - Alembic migration - `remarkbox/templates/namespace-settings.j2` — add fields - `remarkbox/views/reply_node.py` — enforce max depth - `remarkbox/api/views.py` — enforce max depth on API reply - `remarkbox/templates/show-node.j2` — collapse at depth threshold ## Acceptance Criteria - [x] Namespace owners can set max nesting depth - [x] Replies beyond max depth are rejected - [x] Deep threads collapse with a "load more" button