Nicholas Kariniemi
7126a6b7b3
Server assumes client gets messages sent
2014-10-06 19:18:08 +03:00
Nicholas Kariniemi
821ba079e0
Add timeout to make tests work even if channel pull blocks
2014-10-06 17:58:46 +03:00
Nicholas Kariniemi
8850552838
Send empty diffs as ACKs on both client/server
...
On receiving ACK, update "current server state".
2014-10-05 00:12:09 +03:00
Nicholas Kariniemi
76074e5b5c
Optimization: don't reset grub/recipe edit state if unchanged
2014-10-05 00:12:09 +03:00
Nicholas Kariniemi
86bfdf80e4
Simplify MongoDB code by just storing whole state
...
- Every time it receives a state, it blows away the existing one and
puts in the new one.
- There's a non-zero probability of losing the entire state if the
server fails after blowing away the previous state and before
inserting the new.
2014-10-05 00:12:09 +03:00
Nicholas Kariniemi
48ba2c5449
Possibly fully working (poorly tested)
2014-10-04 22:52:03 +03:00
Nicholas Kariniemi
d174b2236e
Integration test for client server sync
2014-09-28 09:35:20 +03:00
Nicholas Kariniemi
e3e763469a
Clean up tests slightly
2014-09-26 21:04:17 +03:00
Nicholas Kariniemi
15b9ec8927
Convert tests to Midje
2014-09-26 20:51:23 +03:00
Nicholas Kariniemi
d7708e1382
Move to shared state
2014-09-26 11:53:19 +03:00
Nicholas Kariniemi
d01814fe3c
Merge client and server state handling -- wip
2014-09-25 23:23:29 +03:00
Nicholas Kariniemi
e6b3c10396
Move state handling to shared code
2014-09-25 23:16:57 +03:00
Nicholas Kariniemi
39307f5a73
Test at "server agent" level
2014-09-25 23:14:26 +03:00
Nicholas Kariniemi
edab2ad684
Add sync test for single diff
2014-09-25 21:43:31 +03:00
Nicholas Kariniemi
3760fc8059
Possible changes - wip
2014-09-24 08:25:42 +03:00
Nicholas Kariniemi
31b6d40aef
wip
2014-09-24 06:20:19 +03:00
Nicholas Kariniemi
f632fabdb2
Move message to shared
2014-09-23 19:52:47 +03:00
Nicholas Kariniemi
36a0e3d419
Move sync code to shared
2014-09-23 19:51:31 +03:00
Nicholas Kariniemi
dc355eb6ec
Separate state handle, sync algorithm
2014-09-23 19:49:08 +03:00
Nicholas Kariniemi
1b8339dec0
Mid-changes: organize state changes
2014-09-22 22:47:36 +03:00
Nicholas Kariniemi
fe5bd00427
Refactor - wip
2014-09-16 23:27:10 +03:00
Nicholas Kariniemi
5a66361746
Rename sync -> diff
2014-09-14 21:30:19 +03:00
Nicholas Kariniemi
ad335d0b23
Make sync tests more explicit
2014-09-14 21:03:51 +03:00
Nicholas Kariniemi
560b895a9b
Try breaking apart sync algorithm
2014-09-07 09:29:06 +03:00
Nicholas Kariniemi
49aa9c784d
Minor refactor
2014-09-03 20:18:04 +03:00
Nicholas Kariniemi
4320401a4e
Better - uses tx-listen
2014-08-30 17:06:48 +03:00
Nicholas Kariniemi
f087309c0f
Possibly fully working differential sync
2014-08-30 15:40:17 +03:00
Nicholas Kariniemi
a572b9e1eb
Reset state from history
...
- fails if server changes are made while client is disconnected
2014-08-30 11:47:09 +03:00
Nicholas Kariniemi
763e6f2fc8
Sync complete state on checksum failure
2014-08-30 08:11:45 +03:00
Nicholas Kariniemi
bd08ea5ec5
Factor out some client/server common state ops
2014-08-30 07:21:59 +03:00
Nicholas Kariniemi
b7b094b253
Refactor wip
2014-08-19 23:24:19 +03:00
Nicholas Kariniemi
4ac42b0cf3
Working hash checks a la hasch
2014-08-13 21:37:17 +03:00
Nicholas Kariniemi
a672155a92
State checks - wip
2014-08-10 22:53:42 +03:00
Nicholas Kariniemi
becfb42627
Sync state using diffs instead of events
2014-08-10 20:55:26 +03:00
Nicholas Kariniemi
f5ac6cbf26
Fix display of recipe titles so whole title shows
2014-08-09 18:40:36 +03:00
Nicholas Kariniemi
11597a9b63
Update local state directly with om cursors
2014-08-09 18:18:27 +03:00
Nicholas Kariniemi
5230dc9601
Patch diff onto state
2014-08-09 16:03:06 +03:00
Nicholas Kariniemi
d775f1dab7
Diff two states
2014-08-09 15:37:39 +03:00
Nicholas Kariniemi
d05b5ebdd5
Use icons instead of text in several places
2014-08-09 00:19:31 +03:00
Nicholas Kariniemi
29547e12be
Hide add grubs button when editing
2014-08-09 00:08:06 +03:00
Nicholas Kariniemi
d018bcf3cf
Remove recipes
2014-08-09 00:07:59 +03:00
Nicholas Kariniemi
8ecc7e9ad4
Delete individual grubs
2014-08-08 23:56:49 +03:00
Nicholas Kariniemi
a83c504e59
Blur grub inputs on click to prevent window from following them
2014-08-08 23:15:21 +03:00
Nicholas Kariniemi
75496c1376
Add accidentally dropped "recur" back
2014-08-08 23:01:09 +03:00
Nicholas Kariniemi
c90c5e41d2
Fix bug with unmounted items crashing it
...
Close core.async channels on unmount, check for unmounted before calling
get-node in listeners
2014-08-07 23:40:48 +03:00
Nicholas Kariniemi
d05df00797
Use readonly attribute, input fields for grubs, too
2014-08-07 23:04:13 +03:00
Nicholas Kariniemi
5a8bda4f0a
Set recipe text area based on grubs
2014-08-07 22:28:52 +03:00
Nicholas Kariniemi
c4096a771a
Move click on elem to before usage
2014-08-07 22:28:33 +03:00
Nicholas Kariniemi
660163c842
Prevent triggering grub edit on pan
2014-08-06 07:18:16 +03:00
Nicholas Kariniemi
0db764b145
Use state machine for new recipes
2014-08-06 00:09:25 +03:00
Nicholas Kariniemi
00efd3d53a
Remove unused local events
2014-08-06 00:09:11 +03:00
Nicholas Kariniemi
4b8f514a4c
Use state transitions for recipes, too
2014-08-05 23:19:14 +03:00
Nicholas Kariniemi
9f01bd3be9
Separate recipe list, recipe item
2014-08-05 22:56:44 +03:00
Nicholas Kariniemi
b7dd1ba94d
Remove touch move event
2014-08-05 22:56:34 +03:00
Nicholas Kariniemi
bc7acf5645
Refactor: handle grub item states with state machine
...
- Also handles plain JS events in place of core async madness
2014-08-05 22:32:59 +03:00
Nicholas Kariniemi
680ca9ab8a
Clean up deps
2014-08-03 10:18:49 +03:00
Nicholas Kariniemi
e79051f991
Update monger connect-via-uri call for lib changes
2014-08-03 00:33:45 +03:00
Nicholas Kariniemi
a7ac7665df
Rework tests slightly
2014-08-02 23:54:02 +03:00
Nicholas Kariniemi
7f45956503
Reorganize tests
2014-07-30 18:03:01 +03:00
Nicholas Kariniemi
8cd03220d3
Add back adding grubs from recipes
2014-07-30 17:51:36 +03:00
Nicholas Kariniemi
7998b205d6
Test adding recipes
2014-07-28 23:35:56 +03:00
Nicholas Kariniemi
a58832da22
Edit recipes
2014-07-28 22:59:39 +03:00
Nicholas Kariniemi
c208d9a625
Also exit editing new recipe on click on other recipes
2014-07-28 20:51:00 +03:00
Nicholas Kariniemi
3a919a5c4c
Add grubs from recipe
2014-07-28 06:32:01 +03:00
Nicholas Kariniemi
cbd44a5756
Add recipe
2014-07-27 11:51:26 +03:00
Nicholas Kariniemi
a22a32d996
Set new recipe to edit mode
2014-07-27 10:20:00 +03:00
Nicholas Kariniemi
608ef993d3
Refactoring
2014-07-27 09:42:55 +03:00
Nicholas Kariniemi
30d2d8a3b1
Edit grubs
2014-07-06 06:52:55 -05:00
Nicholas Kariniemi
80566eed03
Clean up fetching recipes from db
2014-07-03 19:02:39 +03:00
Nicholas Kariniemi
7bb5186e3d
Complete/uncomplete grubs
2014-07-03 18:54:36 +03:00
Nicholas Kariniemi
cda4d2099e
Clear all grubs on click
2014-07-02 23:30:35 +03:00
Nicholas Kariniemi
a3dc09b335
Sort e.g. numerical grubs properly
2014-07-02 23:24:27 +03:00
Nicholas Kariniemi
c23bab8964
Clear added grubs properly
2014-07-02 23:20:54 +03:00
Nicholas Kariniemi
0bf23c9255
Rework state/view handling
2014-07-02 23:13:00 +03:00
Nicholas Kariniemi
fe6514a5f5
Add grubs on enter or click
2014-06-29 23:26:31 +03:00
Nicholas Kariniemi
b1d1f99231
Remove unused code from before
2014-06-29 21:45:50 +03:00
Nicholas Kariniemi
f11621c501
Render recipe list
2014-06-29 21:33:00 +03:00
Nicholas Kariniemi
24632d99ce
Render grub list with om
2014-06-29 12:35:35 +03:00
Nicholas Kariniemi
594408ede2
Use Om for new grub input
2014-06-26 20:01:10 +03:00
Nicholas Kariniemi
dec1fdf8b1
Rework to use source maps
2014-06-25 22:52:35 +03:00
Nicholas Kariniemi
6f458591b5
Update deps, update mongo code to make it work w/ new version
2014-06-25 20:05:11 +03:00
Nicholas Kariniemi
6bf69abab9
Re-focus add input on clicking add item
2014-04-25 22:09:38 +03:00
Nicholas Kariniemi
a313243eba
Update deps
2014-04-25 22:09:37 +03:00
Nicholas Kariniemi
bdf41c6964
Fix: detect enter on other browsers than Chrome
2014-01-12 19:33:36 +02:00
Nicholas Kariniemi
73d965f8f7
Use root URL for WebSocket connection (because Heroku)
2014-01-12 17:40:33 +02:00
Nicholas Kariniemi
b454e782bf
Connect db to MONGOHQ_URL if it exists
2014-01-12 17:40:33 +02:00
Nicholas Kariniemi
081a85379b
Parse command line args better
2014-01-12 15:59:01 +02:00
Nicholas Kariniemi
d4753418ca
Reconnect automatically when disconnected
...
- only send all server items when connecting initially
- on reconnect, send pending events (that couldn't be sent)
- rudimentary solution
2013-10-22 12:15:11 +03:00
Nicholas Kariniemi
307c6cfad5
Fix: add recipe :steps --> :grubs
2013-10-21 23:44:48 +03:00
Nicholas Kariniemi
4a07d98fe9
Refactor recipe view - remove dommy dependence
2013-10-21 23:39:46 +03:00
Nicholas Kariniemi
48ccf9e447
Event to add grubs/recipes as list
2013-10-21 22:56:23 +03:00
Nicholas Kariniemi
42c02397a0
Refactor grub view - remove dommy dependence
2013-10-21 20:43:58 +03:00
Nicholas Kariniemi
e5698f4ff4
Simple alphabetical sorting
2013-10-15 17:58:42 +03:00
Nicholas Kariniemi
8f95beefd8
Move add grubs button to unexpanded rows
2013-10-09 22:37:44 +03:00
Nicholas Kariniemi
9669f57fbb
Remove disconnected clients
2013-10-09 21:57:50 +03:00
Nicholas Kariniemi
955e853e93
Add back sorting of grubs
2013-10-08 22:25:44 +03:00
Nicholas Kariniemi
81299b43dd
Edit recipes + major refactoring
2013-10-08 21:39:58 +03:00
Nicholas Kariniemi
f76eba6829
Fetch jquery locally
2013-10-01 10:53:32 +03:00
Nicholas Kariniemi
6bc7582255
Refactor server to use new core.async goodness
2013-10-01 10:53:32 +03:00
Nicholas Kariniemi
331f74fa4d
Allow CTRL-Enter to save recipes
2013-10-01 10:53:32 +03:00