Skip to content

refactor: shorten the report - #1

Merged
KevinNitroG merged 9 commits into
mainfrom
kevinnitro/shorten
Jun 11, 2026
Merged

refactor: shorten the report#1
KevinNitroG merged 9 commits into
mainfrom
kevinnitro/shorten

Conversation

@KevinNitroG

@KevinNitroG KevinNitroG commented Jun 11, 2026

Copy link
Copy Markdown
Member

Overview

This PR shortens the report from ~130 pages to ~100–105 pages (589 insertions, 955 deletions, 37 files changed), while also fixing outline formatting, figure/table captions, and the cover page.


1. Content reduction (14c3418, 0f6e9ed, 0b0f3ee)

1.1 Chapter 1 — index.typ (+2 / -44)

  • Rationale: shortened problem description, removed redundant phrases ("có thể", "một cách", "chúng ta")
  • Goals – Objectives – Scope – Methodology: condensed prose, dropped CRDT footnote (moved to Ch. 2 where it's explained technically)
  • Features (8 items): each function description trimmed to one line
  • Technologies: shortened bullets for Web App, Backend, Grafana, Docker/Traefik/RustFS; removed SSE footnote

1.2 Chapter 2 — 19 files, 4 core files deeply trimmed

collorative-solution.typ (+11 / -37):

  • Removed duplicate Hello examples (Yjs Hello and BlockNote Hello)
  • Shortened OT/CRDT history: dropped GROVE acronym, original paper titles
  • Removed 4 prose comparison paragraphs already covered by the tech comparison table
  • Merged 4 paragraphs about Figma/Notion/Linear into one summary sentence

yjs.typ (+20 / -93):

  • Shared Data Types: kept 4/6 (dropped Y.XmlElement, Y.XmlText — not used)
  • Editor Bindings: kept 2/6 (ProseMirror, Tiptap — dropped all unrelated editors)
  • Connection Providers: kept 3/8 (y-websocket, y-webrtc, Hocuspocus)
  • Undo/Redo and Awareness: each condensed to a single paragraph

tiptap.typ (+5 / -29):

  • Removed Tiptap architecture table (duplicated by bullet points below)
  • "Role with BlockNote" shortened from 4 paragraphs to 2 sentences

prosemirror.typ (+2 / -22):

  • Removed entire "Collaborative Editing with ProseMirror" section (prosemirror-collab not used — Yjs handles collaboration)

Remaining 15 evaluation files — uniform change:

  • Removed English prefix from pros/cons:
    • Before: + High Performance, hiệu suất cao so với các giải pháp khác
    • After: + Hiệu suất cao so với các giải pháp khác
  • Files: authentik.typ, blocknote.typ, casbin.typ, database.typ, frontend.typ, go.typ, grpc.typ, hocuspocus.typ, meilisearch.typ, nestjs.typ, openapi.typ, postgres.typ, redpanda.typ, rustfs.typ, traefik.typ, typescript.typ

1.3 Chapter 3 — health.typ, nx-cache

health.typ (+5 / -32):

  • Shortened probe descriptions (liveness, readiness, startup)
  • Merged sync/async library features into one sentence
  • Removed verbose intro paragraph about health check architecture

nx-cache.typ (+6 / -28):

  • Condensed script mechanism explanation (removed step-by-step description)
  • Shortened cache size explanation
  • Merged drawback into the end instead of a separate paragraph

usecase.typ (0 / -59) — FILE DELETED:

  • "Update note sequence" use case was redundant (same logic as basic note use case)
  • Cascaded deletion of 3 diagram files: update-note-seq.mmd, .mmd.hash, .svg

1.4 Chapter 4 — index.typ (+1 / -7)

  • em dash (—) → double hyphen (--) in table cells (Typst best practice)

1.5 Chapter 5 — index.typ (+24 / -100)

  • Removed opening meta-paragraph
  • Products: 7 → 6 items (removed report repo link)
  • Technologies: removed Renovate Bot, merged Docker and CI/CD into one item
  • Advantages: removed intro paragraph
  • Challenges: kept 7/11 items (removed 4 niche items: Shadcn paid blocks, watermill-kafka regex, sqlc-gen-go plugin, file tree component without WSL support)
  • Strengths: condensed CI/CD numbers
  • Weaknesses: shortened RAM overhead and Authentik config descriptions
  • Future work: removed intro paragraph

1.6 Appendix — sqlc.typ

  • Deleted entire file (also removed entry from appendix/index.typ)
  • sqlc content no longer relevant — the technology was removed from the project earlier

1.7 Reference impact

  • ~5–7 references indirectly cut via deleted sqlc section, use case, and unused Yjs editors/providers

2. Outline & caption formatting (9833dbb)

2.1 Uppercase chapter titles (TOC level 1)

  • Before: Chương 1. giới thiệu
  • After: Chương 1. GIỚI THIỆU

Uses upper(it.inner()) — only uppercases the chapter name, preserves the "Chương" prefix.

2.2 Period after caption numbers

  • Figure/image/table listings: "Hình 2.1" → "Hình 2.1."
  • Appendix listings: "A. Kiến trúc" → "A. Kiến trúc."
  • Table/algorithm/code listings: same treatment

Implemented via scoped dotted-entry helper in outline.entry display-only — the numbering function is untouched, so cross-references (@fig-..., @appendix-...) are NOT affected by the trailing dot.

2.3 Documentation

  • docs/ai/outline-formatting.md — 90-line reference documenting the approach for AI agents
  • docs/ai/numbering-appendix.md — marked outline section as superseded

3. Summary numbering & typographic dash (e5b70dd, 1d009ec)

  • Added "Tóm tắt" (Summary) to the outline — previously it was outside the numbering system
  • Changed - to -- in summary.typ for consistent typographic dashes

4. Prose reflow & cover fixes (af632e5)

  • Reflowed all prose with typstyle --wrap-text width 80
  • Pure line-wrapping changes only — no content was modified
  • Also fixed cover page: better line breaks in title, "June" instead of "May", added verb "Xây dựng"

5. CI/CD (342f52f)

  • Deploy GitHub Actions workflow only on main branch — prevents deploy from feature branches

6. Per-commit breakdown

af632e5style: reflow prose with typstyle wrap-text

Author: Kevin Nitro
Date:   2026-06-11 12:56:03 +0700

Pure prose reflow via typstyle --wrap-text (width 80). No content changes — only line wrapping.

Files (6 files, +40 -33):

File Delta Note
src/chapter2/yjs.typ +27 -13 Long prose lines wrapped
src/chapter2/prosemirror.typ +19 -8
src/chapter2/tiptap.typ +10 -4
src/chapter2/hocuspocus.typ +9 -4
src/chapter2/frontend.typ +4 -2
src/chapter3/casbin.typ +4 -2

Impact: Cosmetic formatting only — 6 files in Chapter 2–3 realigned to consistent 80-char width.


9833dbbf — fix(outline): uppercase TOC titles and add period after entry numbers

Author: Kevin Nitro
Date:   2026-06-11 12:56:17 +0700

Outline display-only formatting — numbering function untouched, so cross-references stay clean. Applied upper(it.inner()) for TOC level 1. Added trailing period for figure/appendix captions via scoped dotted-entry helper.

Files (3 files, +154 -42):

File Delta Purpose
src/main.typ +97 -42 Outline logic: uppercase chapters, dotted-entry for captions
docs/ai/outline-formatting.md +90 AI agent reference documentation
docs/ai/numbering-appendix.md +9 Marked outline section as superseded

Specific changes in main.typ:

  • TOC level 1: "Chương 1. giới thiệu""Chương 1. GIỚI THIỆU"
  • Figure listings: "Hình 2.1""Hình 2.1."
  • Appendix listings: "A. Kiến trúc""A. Kiến trúc."
  • dotted-entry scoped purely within outline.entry — cross-references unaffected

14c3418chore: remove sqlc section

Author: Kevin Nitro
Date:   2026-06-11 13:06:20 +0700

Removed sqlc appendix — the technology was dropped from the project during POC; the appendix had no remaining value.

Files (2 files, +2 -3):

File Delta Detail
src/chapter5/index.typ +1 -2 Removed reference to sqlc appendix
src/appendix/index.typ +1 -1 Removed #include "sqlc.typ"

0f6e9edchore: remove update note seq use case

Author: Kevin Nitro
Date:   2026-06-11 13:07:36 +0700

Removed redundant "Update note sequence" use case + 3 diagram files (Mermaid source, hash, SVG).

Files (4 files, -95):

File Delta Detail
src/chapter3/usecase.typ -59 Entire file — redundant use case
src/assets/diagrams/update-note-seq.mmd -34 Mermaid source
src/assets/diagrams/update-note-seq.mmd.hash -1 Cache hash
src/assets/diagrams/update-note-seq.svg -1 Rendered SVG

Impact: -95 lines, 4 files, 1 diagram removed from output.


342f52fchore: no deploy beside main branch

Author: Kevin Nitro
Date:   2026-06-11 13:16:39 +0700

Added CI/CD guard — deploy only on main branch.

Files (1 file, +1):

File Delta Detail
.github/workflows/ci.yaml +1 if: github.ref == 'refs/heads/main' on deploy step

0b0f3eerefactor: trim verbose prose and remove redundant English prefixes in pros/cons

Author: Kevin Nitro
Date:   2026-06-11 15:56:12 +0700

Largest commit — net -390 lines (+404 -794) across 27 files. Removed verbose phrases, redundant English prefixes, collapsed duplicate sections and paragraphs.

Files (27 files, +404 -794):

File Delta Category
src/chapter1/index.typ +224 -224 Full restructure — cut verbose phrases, CRDT/SSE footnotes
src/chapter5/index.typ +201 -201 Full restructure — merged products 7→6, dropped 4/11 challenges
src/chapter2/yjs.typ +118 -118 Kept 4/6 data types, 2/6 editor bindings, 3/8 providers
src/chapter2/collorative-solution.typ +88 -88 Removed duplicate Hello, shortened OT/CRDT history, merged Figma/Notion/Linear
src/chapter3/health.typ +53 -53 Shortened probe descriptions, merged sync/async features
src/chapter3/nx-cache.typ +50 -50 Condensed script mechanics, merged drawback
src/chapter2/tiptap.typ +46 -46 Removed architecture table, shortened BlockNote section
src/chapter2/prosemirror.typ +39 -39 Removed entire prosemirror-collab section
src/chapter2/frontend.typ +38 -38 Removed English prefix + rewrap
src/chapter2/authentik.typ +28 -28 Removed English prefix
src/chapter2/postgres.typ +28 -28
src/chapter2/redpanda.typ +27 -27
src/chapter2/traefik.typ +27 -27
src/chapter2/go.typ +26 -26
src/chapter2/nestjs.typ +25 -25
src/chapter2/casbin.typ +24 -24
src/chapter2/blocknote.typ +22 -22
src/chapter2/meilisearch.typ +21 -21
src/chapter2/grpc.typ +18 -18
src/chapter2/openapi.typ +18 -18
src/chapter2/rustfs.typ +18 -18
src/chapter2/typescript.typ +17 -17
src/chapter2/database.typ +16 -16
src/chapter4/index.typ +14 -14 em dash → double hyphen
src/main.typ +6 -6 sticky: true for figure captions
src/appendix/sqlc.typ +2 -2 em dash → double hyphen (pre-deletion cleanup)
src/chapter2/hocuspocus.typ +4 -4

Change patterns:

  1. 15 evaluation files: Removed English prefix from pros/cons:

    -  "High Performance, hiệu suất cao so với các giải pháp khác"
    +  "Hiệu suất cao so với các giải pháp khác"
    
  2. Chapter 1: Cut ~44 lines — removed redundant phrases, CRDT/SSE footnotes, shortened function bullets & technology descriptions

  3. Chapter 2 bulk:

    • collorative-solution.typ: Merged 4 app paragraphs, removed duplicate Hello examples, dropped GROVE acronym
    • yjs.typ: Subset of data types/editor bindings/providers actually used
    • tiptap.typ: Removed architecture table (duplicated by bullets)
    • prosemirror.typ: Removed entire prosemirror-collab section (not used)
  4. Chapter 3:

    • health.typ: Shortened probe descriptions, merged sync/async features
    • nx-cache.typ: Condensed script mechanics and cache size explanation
  5. Chapter 4: -- instead of in table cells

  6. Chapter 5: Removed 4/11 niche challenges, merged products 7→6, removed intro paragraphs

  7. main.typ: Added sticky: true for figure captions to prevent orphan captions on page breaks


e5b70ddchore: let summary be in outline

Author: Kevin Nitro
Date:   2026-06-11 15:58:12 +0700

Added "Tóm tắt" to the outline — previously the summary section was outside the numbering system.

Files (1 file, +1 -1):

File Delta Detail
src/summary.typ +1 -1 #set heading(numbering: "1") to include summary in outline

1d009ecchore: use -- instead of - in summary

Author: Kevin Nitro
Date:   2026-06-11 16:03:18 +0700`

Standardized typographic dash in summary — -- replaces - to match body text convention.

Files (1 file, +6 -6):

File Delta Detail
src/summary.typ +6 -6 6 hyphens → 6 double hyphens in summary bullet items

7. Full file statistics

.github/workflows/ci.yaml              |   1 +
docs/ai/numbering-appendix.md          |   9 +
docs/ai/outline-formatting.md          |  90 +
src/appendix/index.typ                 |   2 +-
src/appendix/sqlc.typ                  |   2 +-
src/assets/diagrams/update-note-seq.mmd      |  34 --
src/assets/diagrams/update-note-seq.mmd.hash |   1 -
src/assets/diagrams/update-note-seq.svg      |   1 -
src/chapter1/index.typ                 | 224 ++++++++++++-------------
src/chapter2/authentik.typ             |  28 ++--
src/chapter2/blocknote.typ             |  22 ++--
src/chapter2/casbin.typ                |  24 ++--
src/chapter2/collorative-solution.typ  |  88 +++--------
src/chapter2/database.typ              |  16 +--
src/chapter2/frontend.typ              |  38 +++---
src/chapter2/go.typ                    |  26 ++--
src/chapter2/grpc.typ                  |  18 +--
src/chapter2/hocuspocus.typ            |   9 ++--
src/chapter2/meilisearch.typ           |  21 ++--
src/chapter2/nestjs.typ                |  25 ++--
src/chapter2/openapi.typ               |  18 +--
src/chapter2/postgres.typ              |  28 ++--
src/chapter2/prosemirror.typ           |  58 +++------
src/chapter2/redpanda.typ              |  27 ++--
src/chapter2/rustfs.typ                |  18 +--
src/chapter2/tiptap.typ                |  56 +++-----
src/chapter2/traefik.typ               |  27 ++--
src/chapter2/typescript.typ            |  17 +--
src/chapter2/yjs.typ                   | 145 ++++++-----------
src/chapter3/casbin.typ                |   4 +-
src/chapter3/health.typ                |  53 +++----
src/chapter3/nx-cache.typ              |  50 +++----
src/chapter3/usecase.typ               |  59 ------
src/chapter4/index.typ                 |  14 +--
src/chapter5/index.typ                 | 204 ++++++++++------------
src/main.typ                           | 103 +++++++++---
src/summary.typ                        |  14 ++--
37 files changed, 589 insertions(+), 955 deletions(-)

KevinNitroG and others added 9 commits June 11, 2026 12:39
Pure line-rewrapping from `just format` (typstyle --wrap-text, width 80);
no content changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Format the `outline.entry` display only — no `numbering` function is
touched — so cross-references (`@fig-...`, `@appendix-...`) stay clean
and free of the trailing-dot double-period problem.

- Main TOC level 1: uppercase the inner title via `upper(it.inner())`
  to match the body heading style, leaving the "Chương" supplement as-is.
- Figure (image/table/raw) and "Phụ lục" lists: add a period after the
  number via a scoped `dotted-entry` helper (e.g. "Hình 2.1.", "A. ...").

Document the approach in docs/ai/outline-formatting.md and mark the
outline parts of docs/ai/numbering-appendix.md as superseded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… pros/cons

=== Summary ===
This commit reduces overall verbosity across the entire report by ~390 lines
(404 insertions, 794 deletions) across 27 files. No content or meaning was
removed — only redundant words, verbose descriptions, and English-prefixed
pros/cons items were tightened.

=== Chapter 1 — index.typ ===
Shortened descriptions across all sections (Lý do chọn đề tài, Mục đích,
Mục tiêu, Đối tượng, Phạm vi, Phương pháp, Chức năng, Công nghệ):
- Removed redundant phrases ("có thể", "một cách", "chúng ta")
- Collapsed verbose footnotes (CRDT, SSE definitions)
- Trimmed function descriptions (8 items) and technology bullets (Web App,
  Backend, Grafana, Docker/Traefik/RustFS)

=== Chapter 2 — 19 files ===
The dominant change across 15 evaluation files is removing the English
prefix from pros/cons bullet items:
  Before: "High Performance, hiệu suất cao so với các giải pháp khác"
  After:  "Hiệu suất cao so với các giải pháp khác"

Larger structural trims in 4 files:
- collorative-solution.typ: Removed duplicate Hello example, shortened
  OT/CRDT history (removed GROVE acronym, paper title), removed 4 prose
  comparison paragraphs (duplicated by table), merged 4 app paragraphs
  (Figma/Notion/Linear) into 1
- yjs.typ: Shared Data Types table kept 4/6 types (dropped Y.XmlElement,
  Y.XmlText). Editor Bindings kept 2/6 (ProseMirror, Tiptap). Connection
  Providers kept 3/8 (y-websocket, y-webrtc, Hocuspocus). Undo/Redo and
  Awareness condensed to single paragraphs
- tiptap.typ: Removed architecture table (duplicated by bullet points),
  shortened Vai trò với BlockNote to 2 sentences
- prosemirror.typ: Removed entire "Collaborative Editing với ProseMirror"
  section (prosemirror-collab not used in project — Yjs handles collab)

=== Chapter 3 — 2 files ===
- health.typ: Shortened probe descriptions, merged sync/async library
  features into single sentence, removed verbose intro
- nx-cache.typ: Condensed script mechanics, cache size explanation, and
  drawback into tighter prose

=== Chapter 4 — index.typ ===
Consolidated em dashes (—) to double hyphens (--) in table cell text

=== Chapter 5 — index.typ ===
Removed opening emph meta-paragraph. Products: 7 to 6 items (removed
report repo link). Technologies: removed Renovate Bot, merged Docker
and CI/CD. Thuận lợi: removed intro paragraph. Khó khăn: removed 4
niche items (Shadcn paid blocks, watermill-kafka regex, sqlc-gen-go
plugin, file tree component), kept 7 items. Ưu điểm: condensed CI/CD
numbers. Nhược điểm: tightened RAM/Authentik description. Hướng phát
triển: removed intro paragraph.

=== Others ===
- main.typ: Added sticky: true for figure captions to prevent orphan
  captions on page breaks
- appendix/sqlc.typ: em dash to double hyphen in heading
@KevinNitroG KevinNitroG changed the title Rút gọn báo cáo: cắt giảm nội dung, định dạng lại outline & trang bìa refactor: shorten the report Jun 11, 2026
@KevinNitroG
KevinNitroG merged commit 58726a2 into main Jun 11, 2026
2 checks passed
@KevinNitroG
KevinNitroG deleted the kevinnitro/shorten branch June 11, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant