feat: add changelog page powered by Notra#341
feat: add changelog page powered by Notra#341mezotv wants to merge 4 commits intodatabuddy-analytics:mainfrom
Conversation
- Add changelog page with split-view layout (sticky left sidebar, scrollable right content) - Integrate Notra REST API for fetching changelog posts - Add 'Powered by Notra' badge with SVG logo linking to usenotra.com - Add changelog links to main and docs navbars - Fix JSX attribute casing in icon components (clipRule, fillRule) - Bump Next.js to ^16.1.6 - External links in changelog content open in new tabs
- Add changelog page with split-view layout (sticky left sidebar, scrollable right content) - Integrate Notra REST API for fetching changelog posts - Add 'Powered by Notra' badge with SVG logo linking to usenotra.com - Add changelog links to main and docs navbars - Fix JSX attribute casing in icon components (clipRule, fillRule) - Bump Next.js to ^16.1.6 - External links in changelog content open in new tabs
…ixes Made-with: Cursor
Made-with: Cursor
|
@mezotv is attempting to deploy a commit to the Databuddy OSS Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds a new Key findings:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant ChangelogPage as ChangelogPage (SSR)
participant Cache as React cache()
participant NotraAPI as Notra API
Browser->>ChangelogPage: GET /changelog
ChangelogPage->>Cache: getChangelogs()
Cache->>NotraAPI: GET /v1/{orgId}/posts?status=published&sort=desc
alt API key / org ID missing
NotraAPI-->>Cache: (skipped — env var guard)
Cache-->>ChangelogPage: FetchError { error: true }
else HTTP error
NotraAPI-->>Cache: non-2xx response
Cache-->>ChangelogPage: FetchError { status, statusText }
else Success
NotraAPI-->>Cache: NotraPostListResponse { posts[], pagination }
Cache-->>ChangelogPage: posts[]
end
ChangelogPage->>ChangelogPage: externalizeLinks(post.content)
ChangelogPage->>ChangelogPage: splitChangelogContent(html)
ChangelogPage->>ChangelogPage: formatChangelogDate(post.createdAt)
ChangelogPage-->>Browser: Rendered HTML (revalidate: 3600s)
Last reviewed commit: 89111b3 |
| clipRule="evenodd" | ||
| d="M22.5661 0.188521C20.5305 1.24471 21.5596 4.42777 23.8111 4.03909C24.8031 3.86788 25.5233 2.90179 25.4313 1.86552C25.3726 1.20378 25.0588 0.658175 24.5322 0.302106C24.0102 -0.0510109 23.126 -0.102035 22.5661 0.188521ZM17.2273 1.35562C16.2686 1.54845 15.9346 1.64947 15.056 2.01165C14.5001 2.24081 13.5086 2.69351 12.8525 3.01751C11.1544 3.85628 10.956 4.19175 11.8848 4.65309C12.2713 4.8451 12.4899 4.87381 13.9091 4.91886L15.5 4.9694L16.3636 5.39387C16.8386 5.62729 17.6568 6.06206 18.1818 6.35996C19.9112 7.3415 20.5818 7.68645 21.3334 7.98105C21.7416 8.14113 22.1803 8.35615 22.308 8.45881C22.5906 8.68585 22.7656 8.6136 23.1366 8.11675C23.3174 7.87447 23.3677 7.73459 23.3086 7.63872C23.2626 7.56414 22.8238 7.26672 22.3336 6.97774C21.2811 6.35721 20.8253 5.98356 20.4709 5.451C20.0966 4.88823 19.9952 4.52975 19.9069 3.45736C19.8583 2.86546 19.7716 2.40666 19.6776 2.24418C19.3228 1.63045 18.0876 1.18249 17.2273 1.35562ZM28.5506 1.44565C28.0258 1.58979 27.5411 1.91214 27.3119 2.26973C27.228 2.40055 27.1414 2.86766 27.0934 3.44802C26.9931 4.6601 26.8177 5.16917 26.2959 5.76209C25.8725 6.24328 25.4326 6.56268 24.3351 7.18562C23.9944 7.37893 23.6942 7.59422 23.668 7.66413C23.6128 7.81116 24.0368 8.41424 24.2944 8.55516C24.427 8.62761 24.5096 8.61408 24.6335 8.49954C24.7235 8.41617 25.2646 8.14862 25.8358 7.90489C26.407 7.66111 27.0968 7.33649 27.3689 7.18335C27.6411 7.03028 28.2932 6.65992 28.8182 6.36037C29.3432 6.06075 30.1615 5.62509 30.6364 5.39229L31.5 4.96892L33.1377 4.91982C34.7115 4.87271 34.7918 4.86096 35.1954 4.61944C35.7123 4.30966 35.7721 4.1675 35.5215 3.84206C35.1566 3.36801 31.5108 1.70874 30.2539 1.44469C29.4136 1.26813 29.1963 1.26834 28.5506 1.44565ZM10.3182 4.22237C8.03055 4.9889 4.16249 5.78867 1.04537 6.13931C0.495365 6.20126 0.0275486 6.26663 0.00584133 6.28456C-0.0744018 6.35076 0.692881 7.07855 1.03052 7.25669C2.16871 7.85676 5.03219 7.84913 7.9032 7.23835C8.63238 7.08322 13.1678 5.59899 13.5091 5.40369C13.572 5.36777 13.2843 5.33199 12.87 5.32409C11.9474 5.30658 11.2585 5.01706 10.92 4.50469C10.7234 4.20685 10.5738 4.13674 10.3182 4.22237ZM36.1029 4.48264C36.0013 4.65069 35.7613 4.8782 35.5695 4.98835C35.1553 5.22631 34.1998 5.40046 33.6856 5.33172L33.3183 5.28269L33.6364 5.43191C33.8114 5.51404 34.6092 5.81113 35.4093 6.09207C38.7018 7.24845 40.2915 7.59477 42.7006 7.68054C44.8534 7.75718 45.8667 7.53035 46.5797 6.8119C46.811 6.57889 47 6.35639 47 6.31738C47 6.27844 46.6831 6.21767 46.2954 6.18223C44.1352 5.98521 39.8447 5.16292 37.7413 4.54287C37.0591 4.34173 36.4532 4.17719 36.3943 4.17719C36.3359 4.17719 36.2046 4.31467 36.1029 4.48264ZM22.5637 4.47447C22.3058 4.73804 22.4916 5.01328 22.9273 5.01328C23.1062 5.01328 23.1104 5.04741 23.0476 5.98864L22.9826 6.96408H23.4546H23.9265L23.8616 5.98864L23.7964 5.01328L24.012 5.01184C24.3555 5.0095 24.4868 4.87854 24.4197 4.60523C24.361 4.36597 24.3499 4.36302 23.5165 4.36302C22.9814 4.36302 22.6328 4.40381 22.5637 4.47447ZM13.7727 5.61568C12.924 6.0418 11.9982 6.40878 10.1141 7.06599C8.11631 7.76274 6.67375 8.07369 5.11358 8.14381C4.45113 8.17361 3.90906 8.2291 3.90906 8.26701C3.90906 8.30492 4.12384 8.42461 4.38628 8.53312C5.97065 9.18785 8.88231 9.20948 11.0909 8.5829C12.7586 8.10982 15.5487 6.86697 16.2104 6.30248C16.4638 6.0863 16.4816 6.04097 16.3677 5.90088C16.1314 5.60984 15.5182 5.3609 14.9572 5.32822C14.4808 5.30033 14.3257 5.3379 13.7727 5.61568ZM31.2273 5.51034C30.9773 5.62942 30.716 5.79705 30.6466 5.88275C30.4429 6.1343 30.7119 6.34252 32.2215 7.10183C34.109 8.05131 35.6198 8.58304 37.2726 8.87991C38.4002 9.08243 40.5169 9.0801 41.4548 8.87531C42.1855 8.71586 43.091 8.37949 43.091 8.26776C43.091 8.2302 42.5489 8.17389 41.8866 8.14257C41.1555 8.10803 40.2412 7.99211 39.5604 7.84776C38.0388 7.52479 34.9975 6.46084 33.3393 5.67144C32.3893 5.21923 31.9145 5.18297 31.2273 5.51034ZM16.7273 6.50953C16.3529 6.84012 13.7907 8.14333 12.8369 8.48827C12.0299 8.78007 10.593 9.16415 9.70323 9.32601L9.04542 9.44564L9.4545 9.63703C10.1385 9.95705 10.8936 10.0581 12.2046 10.0053C13.4894 9.95341 13.8889 9.85109 15.3648 9.19622C16.06 8.88781 18.9188 7.44939 18.9987 7.36794C19.0813 7.28361 18.5923 6.95041 17.8503 6.58534C17.4429 6.38482 17.0951 6.22261 17.0775 6.22467C17.0599 6.22673 16.9023 6.35495 16.7273 6.50953ZM29.3648 6.46297C29.0904 6.59029 28.6663 6.82515 28.4224 6.98516C28.0068 7.25758 27.9896 7.28416 28.1486 7.40654C28.3847 7.58831 30.7111 8.78006 31.591 9.17006C33.1231 9.84896 33.5055 9.94861 34.7911 10.004C36.0941 10.0601 36.8503 9.96021 37.5454 9.64006L37.9548 9.45169L36.9092 9.23681C35.7732 9.00325 34.581 8.66456 33.8284 8.36157C32.9332 8.00097 30.708 6.84527 30.3072 6.53267C30.0874 6.36119 29.8977 6.2233 29.8856 6.22632C29.8736 6.22921 29.6391 6.33572 29.3648 6.46297ZM19.6364 8.50167C18.0025 8.85931 16.9968 9.426 16.4014 10.3246C15.875 11.1189 15.7532 12.5747 16.128 13.5922C16.5749 14.8056 16.9812 15.2323 18.3182 15.8927C19.4958 16.4743 20.3506 16.6152 24.4206 16.8988C25.4721 16.9721 25.8168 17.0341 26.3225 17.2409C27.3906 17.6779 27.9698 18.5217 27.7239 19.2829C27.6062 19.6475 27.2877 19.8813 26.341 20.298C26.0035 20.4465 25.7273 20.5907 25.7273 20.6185C25.7273 20.6461 25.9367 20.7449 26.1926 20.8377C26.4485 20.9306 26.916 21.1679 27.2313 21.3652L27.8047 21.7238L28.3796 21.2766C28.7482 20.9897 29.0649 20.6409 29.2622 20.3048C29.567 19.7846 29.5693 19.7726 29.5268 18.8697C29.49 18.0912 29.446 17.8881 29.2223 17.4683C28.4179 15.958 27.1562 15.2811 24.6364 15.0077C23.9114 14.9291 22.6938 14.8001 21.9307 14.7211C20.4198 14.5647 19.7323 14.3651 18.8519 13.8268C18.2475 13.4575 18.0051 13.0214 18.002 12.2988C17.999 11.5967 18.2378 10.9948 18.7239 10.4796C19.2274 9.94586 19.3996 9.92224 20.3861 10.2512C20.9234 10.4304 21.1371 10.4588 21.5026 10.3994C22.1149 10.3001 22.7046 10.0477 22.8624 9.81744C22.9761 9.65152 22.9746 9.59624 22.8501 9.38089C22.6667 9.06375 21.9664 8.58476 21.5 8.45758C21.0207 8.32696 20.3633 8.34241 19.6364 8.50167ZM25.4438 8.48573C25.0136 8.64286 24.5487 8.93987 24.2865 9.22507C23.836 9.71512 24.212 10.1155 25.3502 10.358C25.9496 10.4858 26.0206 10.4831 26.433 10.317C27.1484 10.0288 27.6842 9.9793 27.9758 10.1746C28.3345 10.4148 28.5265 10.662 28.788 11.2206C28.9859 11.6435 29.0144 11.8137 28.9854 12.4002C28.9604 12.9058 28.9025 13.154 28.7649 13.3458C28.4994 13.7159 26.9856 14.4823 26.3815 14.5525C25.8237 14.6173 25.8537 14.6822 26.5455 14.9065C26.8205 14.9957 27.4323 15.2565 27.9052 15.4861C28.7538 15.8982 28.7685 15.9015 29.0457 15.749C30.0153 15.2154 30.6291 14.4645 30.9513 13.418C31.1765 12.6864 31.1142 11.3811 30.8213 10.6986C30.5666 10.1046 29.8077 9.3677 29.1055 9.03244C28.5778 8.78055 26.7217 8.36308 26.1364 8.36459C25.9364 8.36514 25.6248 8.41974 25.4438 8.48573ZM21.7699 8.9102C21.8356 9.0187 21.5426 9.18407 21.3864 9.12686C21.3239 9.10386 21.2727 9.02591 21.2727 8.95353C21.2727 8.80554 21.6848 8.76956 21.7699 8.9102ZM25.679 8.9102C25.7653 9.05277 25.4272 9.19087 25.2457 9.08703C25.1585 9.03718 25.1108 8.9571 25.1399 8.90917C25.2086 8.79545 25.6101 8.79627 25.679 8.9102ZM22.8914 10.6102C22.7953 11.0367 22.7703 11.6161 22.797 12.7932L22.8335 14.3956H23.4622H24.0909L24.0985 12.979C24.1026 12.1998 24.1168 11.4612 24.1299 11.3375C24.143 11.2138 24.0936 10.869 24.0202 10.5711L23.8868 10.0296H23.4545H23.0221L22.8914 10.6102ZM18.2534 16.7551C17.7592 17.388 17.5352 17.9938 17.4814 18.8433C17.4347 19.5788 17.4502 19.6876 17.6618 20.1105C18.0829 20.9517 18.8944 21.5991 19.9881 21.966C20.9766 22.2978 22.1636 22.4756 23.4091 22.4784C24.6788 22.4813 25.5674 22.6672 25.9959 23.0193C26.5258 23.455 26.7273 23.832 26.7273 24.3884C26.7273 24.8109 26.689 24.9175 26.4498 25.162C26.2972 25.318 26.0109 25.4949 25.8134 25.5554C25.4622 25.6629 25.3261 25.8217 25.5852 25.8217C25.6571 25.8217 25.9801 26.0066 26.3031 26.2325L26.8902 26.6432L27.4209 26.2065C27.8003 25.8941 27.9958 25.6514 28.1071 25.3544C28.5663 24.1301 27.9862 22.4205 26.8508 21.6519C26.1418 21.1722 25.3468 20.9865 23.4136 20.8493C21.6933 20.7272 21.0094 20.5837 20.2273 20.181C18.8745 19.4842 18.9821 18.1195 20.449 17.3676L20.8526 17.1607L20.0399 16.9472C19.593 16.8298 19.0603 16.6718 18.8562 16.5961L18.485 16.4585L18.2534 16.7551ZM22.9296 18.7849L22.9546 20.3873H23.4546H23.9546L23.9794 18.7849L24.0043 17.1825H23.4546H22.9048L22.9296 18.7849ZM19.2792 22.489C19.1842 22.6486 19.0162 23.066 18.9058 23.4168C18.5076 24.6824 18.8142 25.6872 19.8171 26.4032C20.6173 26.9744 21.2633 27.1346 23.0455 27.2037C24.8867 27.275 25.294 27.413 25.6877 28.0994C26.2424 29.0666 26.0004 29.7164 24.8637 30.3124C24.6137 30.4434 24.4766 30.5526 24.559 30.5549C24.6414 30.5573 24.9444 30.6859 25.2322 30.8406L25.7556 31.1219L26.0887 30.886C27.131 30.1479 27.4716 28.8204 26.9029 27.7123C26.5443 27.013 26.281 26.7369 25.6492 26.3967C25.0173 26.0564 24.3856 25.9156 23.4728 25.9113C22.5832 25.9072 21.5009 25.7112 21.0397 25.4707C20.4787 25.1782 20.328 24.9548 20.3358 24.4279C20.3444 23.8409 20.6026 23.3295 21.0377 23.0371L21.3799 22.8071L20.9854 22.7006C20.7684 22.642 20.3746 22.5051 20.1103 22.3963C19.4946 22.1432 19.4843 22.1445 19.2792 22.489ZM23.0001 24.1779V25.5532L23.4319 25.5249L23.8636 25.4965L23.8886 24.1496L23.9137 22.8026H23.4569H23.0001V24.1779ZM20.242 27.3776C19.6447 28.5848 19.7438 29.6679 20.5272 30.4976C21.1334 31.1398 22.1033 31.5215 23.4091 31.632C24.2366 31.7022 24.8322 31.928 25.0276 32.2458C25.2557 32.6169 25.2772 33.0657 25.134 34.4609C24.8417 37.3068 24.7182 37.7228 24.0401 38.1481C23.8759 38.2509 23.8808 38.2589 24.1105 38.2641C24.45 38.2718 24.9351 37.8138 25.1621 37.2714C25.4787 36.5157 26.0253 33.7657 26.0359 32.8756C26.0443 32.1781 26.0184 32.0395 25.8264 31.7525C25.4038 31.1208 24.989 30.9283 23.5455 30.6939C21.5949 30.3771 20.7256 29.4745 21.2596 28.3203C21.3635 28.0957 21.5132 27.8224 21.5923 27.7131C21.7332 27.5183 21.7239 27.5108 21.1039 27.3183C20.7562 27.2105 20.4485 27.1222 20.42 27.1222C20.3916 27.1222 20.3114 27.2372 20.242 27.3776ZM23.0909 28.8872V30.2806H23.4546H23.8182V28.8872V27.4937H23.4546H23.0909V28.8872ZM21.1 31.7298C20.8561 32.0466 20.7815 32.4894 20.8533 33.1921C20.9455 34.0946 21.6027 37.0018 21.8069 37.4107C22.0367 37.8711 22.4881 38.2697 22.7798 38.2697C23.0703 38.2697 23.0577 38.212 22.7288 38.0383C22.5796 37.9594 22.3983 37.7777 22.3259 37.6342C22.1332 37.2537 21.9295 36.0928 21.7774 34.5073C21.6305 32.9776 21.6774 32.443 21.9879 32.1053L22.1802 31.896L21.7695 31.6921C21.5437 31.58 21.3424 31.4882 21.3224 31.4882C21.3023 31.4882 21.2022 31.597 21.1 31.7298ZM23.1821 35.6918C23.1907 37.697 23.1872 39.5469 23.1745 39.8023C23.1601 40.0917 23.2118 40.4048 23.3117 40.6334L23.4719 41L23.6496 40.4941C23.7817 40.1174 23.8106 39.8815 23.7624 39.5702C23.7267 39.3402 23.7088 37.5532 23.7224 35.5987L23.7472 32.0456H23.4569H23.1665L23.1821 35.6918Z" | ||
| fill="currentColor" | ||
| fill-rule="evenodd" |
There was a problem hiding this comment.
Incomplete JSX attribute fix — fill-rule not updated
This PR fixed clip-rule → clipRule in the icon components, but the fill-rule attribute on the same <path> element was not converted to fillRule. In React/JSX, HTML attribute names must use camelCase; using fill-rule will trigger a React warning (Invalid DOM property 'fill-rule'. Did you mean 'fillRule'?) and the attribute may not be applied correctly in the rendered SVG.
The same issue also exists in apps/docs/components/icons/iso27001.tsx at lines 18, 28, and 38.
| fill-rule="evenodd" | |
| fillRule="evenodd" |
| description: string; | ||
| body: string; | ||
| } { | ||
| const h2Index = html.indexOf("<h2>"); |
There was a problem hiding this comment.
splitChangelogContent misses <h2> with attributes
html.indexOf("<h2>") performs an exact string match and will silently fail to split content when the API returns an <h2> tag that carries HTML attributes (e.g. <h2 class="..." id="...">). In that case h2Index is -1 and the entire post content is classified as description, leaving body empty — meaning the right-hand panel always shows "No additional details." for any post whose first section header has attributes.
A more robust approach is to use a case-insensitive pattern:
const h2Index = html.search(/<h2[\s>]/i);This matches both <h2> and <h2 class="..."> regardless of casing.
| return html.replace( | ||
| /<a\s+(href="[^"]*")/g, | ||
| '<a target="_blank" rel="noopener noreferrer" $1' | ||
| ); |
There was a problem hiding this comment.
externalizeLinks regex skips links with leading attributes
The regex /<a\s+(href="[^"]*")/g only matches <a> tags where href is the very first attribute (with double-quote delimiters). Any link that has another attribute before href — e.g. <a class="..." href="https://..."> — will not receive a target="_blank" and will open in the same tab.
A more reliable approach would match the href attribute regardless of its position in the tag:
return html.replace(/<a\b([^>]*)>/gi, (match, attrs) => {
if (/\btarget=/i.test(attrs)) return match;
return `<a${attrs} target="_blank" rel="noopener noreferrer">`;
});| <Link | ||
| className="mx-auto flex w-fit items-center gap-2 rounded-full border border-border/40 bg-card/30 px-4 py-2 text-muted-foreground/50 transition-colors hover:border-border/60 hover:text-muted-foreground/70" | ||
| href="https://www.usenotra.com" | ||
| rel="noopener" |
There was a problem hiding this comment.
Missing noreferrer on external badge link
The "Powered by Notra" link uses rel="noopener" but omits noreferrer. Without noreferrer, the browser sends a Referer header to usenotra.com revealing the origin URL, and (in older browsers) the opened window can still access window.opener. Best practice for target="_blank" links is rel="noopener noreferrer".
| rel="noopener" | |
| rel="noopener noreferrer" |
Description
Checklist