• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dcm31

dcm31

moiPosterImproved

Tool to manage moi.md files for Val Town content
Public
Like
moiPosterImproved
Home
Code
7
backend
2
frontend
2
shared
2
PR.md
README.md
moi.md
testfile_1745875710738.txt
Branches
12
Pull requests
8
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
PR.md
Code
/
PR.md
Search
5/2/2025
PR.md

Pull Request: buildDotMoi-Style Tabs Interface for MoiPosterImproved

Description

This PR enhances the MoiPosterImproved project to better reflect how content appears on a buildDotMoi profile. It implements a tabs-based navigation system that matches the actual buildDotMoi interface, with support for:

  1. A default "Posts" tab that shows all vals with moi.md files (not excluded from posts)
  2. Custom tabs defined in moi.md frontmatter "tabs" field
  3. An "Unposted" tab for vals without moi.md files
  4. The original tabs for Code (Public), Unlisted, and Private still exist for convenience

Implementation Details

Frontend Changes

  • ProfilePreview.tsx: Completely redesigned to fetch and display moi information for all vals, with proper sorting by tier
    • Now displays custom tabs from moi.md files as defined in frontmatter
    • Supports tier-based sorting (no tier first, then lowest to highest)
    • Respects the "excludeFromPosts" setting from moi.md files
    • Added informative notices explaining what each tab displays

Backend Changes

  • moiProcessor.ts:

    • Added a dedicated parseMoiConfig function to extract configuration from moi.md files
    • Enhanced parsing to properly handle tier, tabs, and excludeFromPosts properties
  • index.ts:

    • Updated API endpoints to include parsed moi.md configuration in responses
    • Added config parsing to both file fetching and creation/update endpoints

Features Added

  1. Dynamic Tab Generation: Tabs are populated from the "tabs" fields in moi.md files
  2. Tier-Based Sorting: Vals are sorted by tier with no tier first, then lowest to highest
  3. Exclusion Support: "excludeFromPosts" property allows vals to appear in custom tabs but not in the main Posts tab
  4. Improved Preview: The interface better represents how content will appear on a buildDotMoi profile

Testing Instructions

  1. Start the app and enter your Val Town API key
  2. Notice the new tab interface showing "Posts" first, followed by any custom tabs found in your moi.md files, then "Unposted"
  3. Edit a val's moi.md and add a custom tab using the "Tabs" field
  4. Save and verify the new tab appears in the interface
  5. Try setting different tier values to see how it affects sorting
  6. Test the "Exclude from Posts" checkbox and verify it removes items from the Posts tab but keeps them in custom tabs

Notes

  • The existing functionality for editing moi.md files remains unchanged - this PR only enhances the preview interface
  • The MoiEditor component already supported the tabs, tier, and excludeFromPosts properties
  • The generators.ts file already included support for these properties in the default moi.md generation

Screenshots

(Would include screenshots here in a real PR)

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.