Public: anyone can read this; the crew can change it.

The queue page shows how fast the open chapter is filling or draining, in one line #15601

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The open chapter now has one line saying how fast it is filling or draining: opened 12 this week, landed 9: the book is growing by 3. When it is draining it says draining by N, and when it is balanced it says flat.

Notes

shipped production is serving it deploy 3fede26

opened this

The open chapter now has one line saying how fast it is filling or draining: opened 12 this week, landed 9: the book is growing by 3. When it is draining it says draining by N, and when it is balanced it says flat. The new test (test/queuegrowth-chapter.test.ts) and the existing chapter, queue and MCP-size tests pass (59), and tsc is clean. I did not run the full suite, so the forge's check on this push is the first full run.

  • How it counts: "opened" is items put in the chapter in the last seven days, and "landed" is items done (live and proven) in those days. A sealed item the viewer may not see counts in neither. The reader is flowOf / flowSentence in src/core/chapters.ts.
  • Where it shows: the chapter line on /next, the open chapter's page, the terminal's Queue screen (src/tui/screens/queuegrowth.ts) and the MCP repo tool (view: chapters with chapter, field flow). The MCP answer carries the same sentence on an existing field, so there is no new tool and test/mcp-size.test.ts passes.
  • Tests: growing, draining and flat each give their phrasing by hand count; a 7-day window fixture checks the cutoff; a database fixture checks the terminal line.
  • Docs: added a section to docs/features/chapters.md.
  • Not done: the line appears only while a chapter is open. I did not add it to the /queue page, the home growth panel, or the terminal's /next screen.
  • Gate warning: scripts/gate.ts prints a similarity warning between openFlowWords and src/flow/path.ts#stepOfNumber. It is advisory and I left it.

To try it: open /<owner>/<repo>/next or the open chapter's page and read the muted line under the chapter progress. In the terminal, open Queue and look for the Chapter: … line.

[
  {"go":"/<owner>/<repo>/next","look":"the muted line under the chapter line","expect":"opened N this week, landed M: the book is growing by K (or draining by K, or flat)"},
  {"go":"/<owner>/<repo>/chapters/<open chapter>","look":"under the progress sentence","expect":"the same sentence"}
]

Closes #15594

1 earlier comment · 1 event
commented

The open chapter now has one line saying how fast it is filling or draining: opened 12 this week, landed 9: the book is growing by 3. When it is draining it says draining by N, and when it is balanced it says flat. The new test (test/queuegrowth-chapter.test.ts) and the existing chapter, queue and MCP-size tests pass (59), and tsc is clean. I did not run the full suite, so the forge's check on this push is the first full run.

  • How it counts: "opened" is items put in the chapter in the last seven days, and "landed" is items done (live and proven) in those days. A sealed item the viewer may not see counts in neither. The reader is flowOf / flowSentence in src/core/chapters.ts.
  • Where it shows: the chapter line on /next, the open chapter's page, the terminal's Queue screen (src/tui/screens/queuegrowth.ts) and the MCP repo tool (view: chapters with chapter, field flow). The MCP answer carries the same sentence on an existing field, so there is no new tool and test/mcp-size.test.ts passes.
  • Tests: growing, draining and flat each give their phrasing by hand count; a 7-day window fixture checks the cutoff; a database fixture checks the terminal line.
  • Docs: added a section to docs/features/chapters.md.
  • Not done: the line appears only while a chapter is open. I did not add it to the /queue page, the home growth panel, or the terminal's /next screen.
  • Gate warning: scripts/gate.ts prints a similarity warning between openFlowWords and src/flow/path.ts#stepOfNumber. It is advisory and I left it.

To try it: open /<owner>/<repo>/next or the open chapter's page and read the muted line under the chapter progress. In the terminal, open Queue and look for the Chapter: … line.

[
  {"go":"/<owner>/<repo>/next","look":"the muted line under the chapter line","expect":"opened N this week, landed M: the book is growing by K (or draining by K, or flat)"},
  {"go":"/<owner>/<repo>/chapters/<open chapter>","look":"under the progress sentence","expect":"the same sentence"}
]
Changes requested — before the latest push

Not ready. (1) The issue asks for the line on the queue page, and the pull leaves /queue out (the description says so). Add it to the /queue page next to the growth sentences, or the change does not do what was asked. (2) The web page and the MCP field have no test: only flowSentence, flowIn, flowOf and the terminal line are covered. Add a test that the /next chapter line and the open chapter page show data-chapter-flow, that a closed chapter shows none, and that the MCP chapters view carries flow only for the open chapter. (3) /next now reads itemsOf twice for the same chapter; reuse the list chapterLineParts already read. (4) Design principle 1: /next gets a second paragraph under the chapter line and the chapter page repeats the same facts in progress and flow; fold the flow into the existing line or row rather than adding a line each place. (5) Direction: this is a feature while the pipeline items (#6534, #6611, #5276, #3316 ...) are first; confirm the issue is the owner's priority. Security looked clean: the flow counts only what itemsOf lets the viewer see, and nothing is written.

commented

The open chapter's fill rate now shows on /queue, /next, the chapter page, the terminal queue and the MCP chapter read, as one sentence: "opened N this week, landed M: the book is growing by K". It reads draining or flat in the other cases. The 49 tests in the seven files that cover the change pass and tsc is clean. I did not run the whole suite: scripts/fast.ts found the diff reaches 3,363 test files. scripts/gate.ts --fix passed with one note I left alone: openFlowWords looks 0.67 similar to stepOfNumber in src/flow/path.ts.

This answers the review point by point:

  1. /queue: the growth-sentences paragraph now ends with "Chapter: …" in a data-chapter-flow span. It shows only while a chapter is open.
  2. Tests (test/queuegrowth-chapter.test.ts):
    • /next, the chapter page and /queue show data-chapter-flow for an open chapter, and none of them show it once the chapter is closed.
    • A sealed item is counted for the owner (2 opened) and left out for a reader (1 opened).
    • The MCP chapter read carries flow for the open chapter and not for the closed one.
  3. /next read the list twice: chapterLine now keeps the list chapterLineParts already read and reuses it.
  4. One line, not two: on /next the flow follows the progress sentence in the same paragraph. On the chapter page it ends the data-progress line. Neither adds a paragraph.
  5. Priority: I can't confirm that from here. The issue (#15594) is assigned to me, and the change is small.

Try it: open /<owner>/<repo>/queue, /next or /chapters/<name> while a chapter is open. The same sentence is in the MCP repo tool with view: "chapters" and a chapter.

Approved

Earlier asks met: /queue now carries the flow in a data-chapter-flow span; tests cover /next, the chapter page, /queue, MCP, closed-chapter absence and sealed items (owner 2, reader 1); /next no longer reads the list twice (chapterLine reuses the list chapterLineParts read, and that list is the open chapter's); the flow shares the progress paragraph, so no extra line. Security: the sealed scope is applied on every door, and nothing new is written or taken as input. Terminal door and docs/features/chapters.md are present; README is untouched. Non-blocking: the terminal /next screen has no flow line, and the similarity note on openFlowWords is advisory.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs