• 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
6
backend
2
frontend
2
shared
2
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
/
README.md
Code
/
README.md
Search
5/1/2025
Viewing readonly version of main branch: v60
View latest version
README.md

MoiPoster Improved

A tool to create and manage moi.md files for Val Town vals.

Fix Editor Input Branch

This branch addresses critical usability issues with the editors in the MoiPoster tool:

  1. Input Focus Issues: Previously, when editing input fields in the moi.md editor, the input would sometimes lose focus and freeze up, making it difficult to type smoothly.

  2. Save Functionality Problems: After the initial input focus fix, there was an issue where saving would reset content to defaults or not save the latest changes.

  3. Editor Simplification: Removed the unnecessary Editor Type toggle and Preview mode which were contributing to the usability issues.

Root Causes:

  1. The editor was trying to update the content in real-time with every keystroke
  2. Each update was triggering a re-render, which would cause the input to lose focus
  3. State synchronization issues between components caused saving problems
  4. Content wasn't properly tracked between components during save operations

Changes Made:

  1. MoiEditor.tsx:

    • Removed the isUserEditing state and automatic real-time updates
    • Simplified the change handling logic to avoid excessive state updates
  2. QuickEditor.tsx:

    • Improved direct content tracking with references
    • Made field updates immediately propagate to the parent to ensure data is saved
    • Kept all advanced options but moved them under a collapsible section
    • Added detailed logging to track changes
  3. MoiEditorModal.tsx:

    • Simplified to use only the QuickEditor component
    • Removed the editor type toggle and preview mode
    • Added content reference tracking to prevent loss of edits
    • Added safeguards to ensure latest content is always saved
  4. App.tsx:

    • Added a reference-based approach to track the latest content reliably
    • Improved save functionality to use the most up-to-date content
    • Added detailed logging for debugging content flow
    • Added safeguards against content reloading during save operations

How to Test

  1. Open a val in the editor
  2. Try typing in any of the input fields - you should now be able to type smoothly without the cursor jumping or input freezing
  3. Make several edits to different fields and save - all changes should be properly preserved
  4. Try editing fields in the "Advanced Options" section - those changes should also be properly saved

Original README Content

Tool to manage moi.md files for Val Town content.

Features:

  • Browse your vals
  • Create and edit moi.md files
  • Quickly update frontmatter
  • Save directly to your Val

What is moi.md?

The moi.md file is a special Markdown file that Val Town uses to display information about your val on the platform, especially for the build.moi page.

Usage:

  1. Add your Val Town API key
  2. Browse and select a val
  3. Create or edit the moi.md file
  4. Save your changes
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.